Message301348
I suggest to use my perf module to run benchmark, especially if the tested function takes less than 1 ms, which is the case here.
Attached benchmark script calls asyncio.get_event_loop(). Result on the master branch with PR 3347:
haypo@selma$ ./python ~/bench_asyncio.py --inherit=PYTHONPATH -o patch.json
haypo@selma$ ./python ~/bench_asyncio.py --inherit=PYTHONPATH -o ref.json
haypo@selma$ ./python -m perf compare_to ref.json patch.json
Mean +- std dev: [ref] 881 ns +- 42 ns -> [patch] 859 ns +- 14 ns: 1.03x faster (-3%)
I'm not convinced that the PR is worth it. 3% is not interesting on a micro benchmark.
Or is there an issue in my benchmark? |
|
Date |
User |
Action |
Args |
2017-09-05 18:14:51 | vstinner | set | recipients:
+ vstinner, yselivanov, jimmylai |
2017-09-05 18:14:51 | vstinner | set | messageid: <1504635291.77.0.756733475579.issue31350@psf.upfronthosting.co.za> |
2017-09-05 18:14:51 | vstinner | link | issue31350 messages |
2017-09-05 18:14:51 | vstinner | create | |
|