Author serhiy.storchaka
Recipients larry, serhiy.storchaka, vstinner
Date 2019-02-26.17:34:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551202440.14.0.562736617209.issue36127@roundup.psfhosted.org>
In-reply-to
Content
Some examples:

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000 -s "round_ = round" "round_(4.2)"
Mean +- std dev: [...] 110 ns +- 3 ns -> [...] 81.4 ns +- 2.2 ns: 1.35x faster (-26%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000 -s "sum_ = sum" "sum_(())"
Mean +- std dev: [...] 88.0 ns +- 6.5 ns -> [...] 57.6 ns +- 1.1 ns: 1.53x faster (-35%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000 -s "sum_ = sum; a = [1, 2]"  "sum_(a)"
Mean +- std dev: [...] 95.9 ns +- 2.1 ns -> [...] 70.6 ns +- 2.0 ns: 1.36x faster (-26%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000  "'abc'.split()"          
Mean +- std dev: [...] 102 ns +- 3 ns -> [...] 80.5 ns +- 2.1 ns: 1.26x faster (-21%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000  "b'abc'.split()"
Mean +- std dev: [...] 91.8 ns +- 2.3 ns -> [...] 75.1 ns +- 1.4 ns: 1.22x faster (-18%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000  "'abc'.split('-')"
Mean +- std dev: [...] 118 ns +- 2 ns -> [...] 89.2 ns +- 1.8 ns: 1.32x faster (-24%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000  "b'abc'.decode()"
Mean +- std dev: [...] 96.1 ns +- 3.6 ns -> [...] 78.9 ns +- 2.2 ns: 1.22x faster (-18%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000  "'abc'.encode()"
Mean +- std dev: [...] 72.4 ns +- 1.9 ns -> [...] 55.1 ns +- 1.8 ns: 1.31x faster (-24%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000 -s "int_= int"  "int(4.2)"
Mean +- std dev: [...] 105 ns +- 4 ns -> [...] 78.8 ns +- 1.9 ns: 1.33x faster (-25%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000 -s "int_= int"  "int('5')"
Mean +- std dev: [...] 154 ns +- 5 ns -> [...] 122 ns +- 4 ns: 1.26x faster (-21%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000  "42 .to_bytes(2, 'little')
Mean +- std dev: [...] 109 ns +- 3 ns -> [...] 72.4 ns +- 1.9 ns: 1.51x faster (-34%)

$ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000 "from_bytes = int.from_bytes" "from_bytes(b'ab', 'little')"
Mean +- std dev: [...] 138 ns +- 3 ns -> [...] 96.3 ns +- 3.0 ns: 1.43x faster (-30%)
History
Date User Action Args
2019-02-26 17:34:00serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, larry
2019-02-26 17:34:00serhiy.storchakasetmessageid: <1551202440.14.0.562736617209.issue36127@roundup.psfhosted.org>
2019-02-26 17:34:00serhiy.storchakalinkissue36127 messages
2019-02-26 17:34:00serhiy.storchakacreate