[Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered (original) (raw)
Eric Snow ericsnowcurrently at gmail.com
Thu Sep 15 09:08:50 EDT 2016
- Previous message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Next message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sep 15, 2016 06:06, "Serhiy Storchaka" <storchaka at gmail.com> wrote:
Python 3.5: 10 loops, best of 3: 33.5 msec per loop Python 3.6: 10 loops, best of 3: 37.5 msec per loop
These results look surprisingly and inexplicably to me. I expected that even if there is some performance regression in the lookup or modifying operation, the iteration should not be slower.
My understanding is that the all-int-keys case is an outlier. This is due to how ints hash, resulting in fewer collisions and a mostly insertion-ordered hash table. Consequently, I'd expect the above microbenchmark to give roughly the same result between 3.5 and 3.6, which it did.
-eric -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160915/12b35279/attachment.html>
- Previous message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Next message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]