On Wed, Mar 19, 2014 at 11:43 PM, Nick Coghlan <ncoghlan at gmail.com> wrote: > > On 20 Mar 2014 07:38, "Nick Coghlan" <ncoghlan at gmail.com> wrote: >> >> Correct, but I think this discussion has established that "how many times >> dict lookup calls __eq__ on the key" is one such thing. In CPython, it >> already varies based on: >> >> - dict contents (due to the identity check and the distribution of entries >> across hash buckets) >> - pointer size (due to the hash bucket distribution differing between 32 >> bit and 64 bit builds) >> - dict tuning parameters (there are some settings in the dict >> implementation that affect when dicts resize up and down, etc, which can >> mean the hash bucket distribution may already change without much notice in >> feature releases) > > I just realised that hash randomisation also comes into play here - the > distribution of entries across hash buckets is inherently variable between > runs for any key types that rely directly or indirectly on a randomised > hash. > > Cheers, > Nick. > > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/fijall%40gmail.com > at the end of the day we settled for dicts with str int or identity keys, so we're perfectly safe
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4