This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author njs
Recipients chris.jerdonek, giampaolo.rodola, mbussonn, ncoghlan, njs, yselivanov
Date 2018-01-24.04:29:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516768140.87.0.467229070634.issue30491@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-01-24 04:29:00njssetrecipients: + njs, ncoghlan, giampaolo.rodola, chris.jerdonek, yselivanov, mbussonn
2018-01-24 04:29:00njssetmessageid: <1516768140.87.0.467229070634.issue30491@psf.upfronthosting.co.za>
2018-01-24 04:29:00njslinkissue30491 messages
2018-01-24 04:29:00njscreate