<p dir="ltr"><br>
On 20 Mar 2014 07:38, "Nick Coghlan" <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>
><br>
> 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:<br>
><br>
> - dict contents (due to the identity check and the distribution of entries across hash buckets)<br>
> - pointer size (due to the hash bucket distribution differing between 32 bit and 64 bit builds)<br>
> - 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)</p>

<p dir="ltr">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.</p>

<p dir="ltr">Cheers,<br>
Nick.</p>