Serhiy Storchaka <[email protected]> added the comment:
Some examples:
$ ./python -m timeit "format('abc')"
Unpatched: 5000000 loops, best of 5: 65 nsec per loop
Patched: 5000000 loops, best of 5: 42.4 nsec per loop
$ ./python -m timeit "'abc'.replace('x', 'y')"
Unpatched: 5000000 loops, best of 5: 101 nsec per loop
Patched: 5000000 loops, best of 5: 63.8 nsec per loop
$ ./python -m timeit "'abc'.ljust(5)"
Unpatched: 2000000 loops, best of 5: 120 nsec per loop
Patched: 5000000 loops, best of 5: 94.4 nsec per loop
$ ./python -m timeit "(1, 2, 3).index(2)"
Unpatched: 2000000 loops, best of 5: 100 nsec per loop
Patched: 5000000 loops, best of 5: 62.4 nsec per loop
$ ./python -m timeit -s "a = [1, 2, 3]" "a.index(2)"
Unpatched: 2000000 loops, best of 5: 93.8 nsec per loop
Patched: 5000000 loops, best of 5: 70.1 nsec per loop
./python -m timeit -s "import math" "math.pow(0.5, 2.0)"
Unpatched: 2000000 loops, best of 5: 112 nsec per loop
Patched: 5000000 loops, best of 5: 82.3 nsec per loop
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35582>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com