>
>
> 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`.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to