STINNER Victor added the comment:

As I expected, a dictionary lookup is a _little bit_ slower (3%) between Python 
3.5 and Python 3.6:

$ ./python -m perf timeit -s 'd={str(i):i for i in range(100)}' 'd["10"]; 
d["20"]; d["30"]; d["40"]; d["50"]; d["10"]; d["20"]; d["30"]; d["40"]; 
d["50"]' --rigorous

Median +- std dev: [lookup35] 309 ns +- 10 ns -> [lookup36] 320 ns +- 8 ns: 
1.03x slower

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27350>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to