[Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

Ethan Furman ethan at stoneleaf.us
Thu Sep 15 11:36:43 EDT 2016


On 09/15/2016 08:02 AM, Raymond Hettinger wrote:

> Eric is correct on this one.  The consecutive hashes make a huge difference for Python 3.5.   While there is a table full table scan, the check for NULL entries becomes a predictable branch when all the keys are in consecutive positions.   There is an astonishingly well written stack overflow post that explains this effect clearly: http://stackoverflow.com/questions/11227809

Thanks for that.  Very good answer.

--
~Ethan~


More information about the Python-Dev mailing list