Message310558
Yury also asked me to try running a generator/coroutine microbenchmark from PEP 492 (https://www.python.org/dev/peps/pep-0492/#async-await). I'm attaching the actual script for that as well (pep492bench.py), since I had to add a few lines to actually run the functions in the PEP :-).
Results from 3 runs each of the two builds, alternating:
-----
~/src/cpython$ without-unawaited-tracking/install/bin/python3 pep492bench.py
binary(19) * 30: total 7.349s
abinary(19) * 30: total 7.727s
~/src/cpython$ with-unawaited-tracking/install/bin/python3 pep492bench.py
binary(19) * 30: total 7.758s
abinary(19) * 30: total 8.023s
~/src/cpython$ without-unawaited-tracking/install/bin/python3 pep492bench.py
binary(19) * 30: total 7.326s
abinary(19) * 30: total 7.686s
~/src/cpython$ with-unawaited-tracking/install/bin/python3 pep492bench.py
binary(19) * 30: total 7.652s
abinary(19) * 30: total 7.999s
~/src/cpython$ without-unawaited-tracking/install/bin/python3 pep492bench.py
binary(19) * 30: total 7.421s
abinary(19) * 30: total 7.732s
~/src/cpython$ with-unawaited-tracking/install/bin/python3 pep492bench.py
binary(19) * 30: total 7.541s
abinary(19) * 30: total 8.132s
-----
So here we get a small difference between the with-unawaited-tracking and the without-unawaited-tracking builds. For generators, with-unawaited-tracking is:
In [1]: (7.541 + 7.652 + 7.758) / (7.349 + 7.326 + 7.421)
Out[1]: 1.0386947863866764
~3.9% slower.
And for coroutines, with-unawaited-tracking is:
In [2]: (8.023 + 7.999 + 8.132) / (7.727 + 7.686 + 7.732)
Out[2]: 1.043594728883128
~4.4% slower. |
|
| Date |
User |
Action |
Args |
| 2018-01-24 04:29:00 | njs | set | recipients:
+ njs, ncoghlan, giampaolo.rodola, chris.jerdonek, yselivanov, mbussonn |
| 2018-01-24 04:29:00 | njs | set | messageid: <1516768140.87.0.467229070634.issue30491@psf.upfronthosting.co.za> |
| 2018-01-24 04:29:00 | njs | link | issue30491 messages |
| 2018-01-24 04:29:00 | njs | create | |
|