Message308291
This adds an overhead to every indexing.
$ ./python -m perf timeit --compare-to=./python0 -s 'a = [1]' --duplicate=10000 'a[0]'
python0: ..................... 15.3 ns +- 0.5 ns
python: ..................... 16.1 ns +- 0.3 ns
Mean +- std dev: [python0] 15.3 ns +- 0.5 ns -> [python] 16.1 ns +- 0.3 ns: 1.05x slower (+5%)
$ ./python -m perf timeit --compare-to=./python0 -s 'd = {1: 2}' --duplicate=10000 'd[1]'
python0: ..................... 17.6 ns +- 0.6 ns
python: ..................... 18.4 ns +- 0.5 ns
Mean +- std dev: [python0] 17.6 ns +- 0.6 ns -> [python] 18.4 ns +- 0.5 ns: 1.05x slower (+5%) |
|
| Date |
User |
Action |
Args |
| 2017-12-14 12:22:25 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, levkivskyi, xgdomingo |
| 2017-12-14 12:22:24 | serhiy.storchaka | set | messageid: <[email protected]> |
| 2017-12-14 12:22:24 | serhiy.storchaka | link | issue32226 messages |
| 2017-12-14 12:22:24 | serhiy.storchaka | create | |
|