> > > Note that this is made at the expense of the 20% slowing down an iteration. > > $ ./python -m timeit -s "d = dict.fromkeys(range(10**6))" -- "list(d)" > Python 3.5: 66.1 msec per loop > Python 3.6: 82.5 msec per loop > > Are two Pythons built with same options? In my environ: ~/local/python-master/bin/python3 -m timeit -s "d = dict.fromkeys(range(10**6))" 'list(d)' Python master (8cd9c) 100 loops, best of 3: 11 msec per loop Python 3.5.2 100 loops, best of 3: 11.6 msec per loop And dict creation time is: ~/local/python-master/bin/python3 -m timeit "d = dict.fromkeys(range(10**6))" Python master 10 loops, best of 3: 70.1 msec per loop Python 3.5.2 10 loops, best of 3: 78.2 msec per loop Both Python is built without neither `--with-optimizations` or `make profile-opt`. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160915/93372294/attachment-0001.html>
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