STINNER Victor added the comment: 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? ---------- Added file: http://bugs.python.org/file47120/bench_asyncio.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31350> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com