Message291683
| Author |
serhiy.storchaka |
| Recipients |
methane, r.david.murray, serhiy.storchaka, xiang.zhang |
| Date |
2017年04月14日.19:41:47 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1492198908.13.0.340291759361.issue30040@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I got following result:
$ ./python.patched -m perf timeit --compare-to=./python.default --duplicate=100 -- '{}'
python.default: ..................... 203 ns +- 5 ns
python.patched: ..................... 97.1 ns +- 0.7 ns
Mean +- std dev: [python.default] 203 ns +- 5 ns -> [python.patched] 97.1 ns +- 0.7 ns: 2.09x faster (-52%)
$ ./python.patched -m perf timeit --compare-to=./python.default --duplicate=100 -- 'x={}; x[1]=1'
python.default: ..................... 494 ns +- 5 ns
python.patched: ..................... 592 ns +- 7 ns
Mean +- std dev: [python.default] 494 ns +- 5 ns -> [python.patched] 592 ns +- 7 ns: 1.20x slower (+20%)
Seems something is wrong with resizing an empty dict. It shouldn't take such much time. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年04月14日 19:41:48 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, r.david.murray, methane, xiang.zhang |
| 2017年04月14日 19:41:48 | serhiy.storchaka | set | messageid: <1492198908.13.0.340291759361.issue30040@psf.upfronthosting.co.za> |
| 2017年04月14日 19:41:48 | serhiy.storchaka | link | issue30040 messages |
| 2017年04月14日 19:41:47 | serhiy.storchaka | create |
|