[issue32204] async/await performance is very low

Liran Nuna report at bugs.python.org
Sun Dec 3 04:09:09 EST 2017


New submission from Liran Nuna <liranuna at gmail.com>:

The performance of async/await is very low when compared to similar code that implements similar functionality via iterators, such as Quora's asynq library (https://github.com/quora/asynq/tree/master/asynq).

Based on my benchmarks, asynq is almost twice as fast as async/await. 

I have found some performance hanging fruit when benchmarking (See attached GitHub PR).


$ time python batch_asyncio.py 

real	0m5.851s
user	0m5.760s
sys	0m0.088s
$ time python batch_asynq.py 

real	0m2.999s
user	0m2.900s
sys	0m0.076s

----------
components: asyncio
files: batch_asyncio.py
messages: 307492
nosy: Liran Nuna, yselivanov
priority: normal
pull_requests: 4599
severity: normal
status: open
title: async/await performance is very low
type: performance
versions: Python 3.6
Added file: https://bugs.python.org/file47313/batch_asyncio.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32204>
_______________________________________


More information about the Python-bugs-list mailing list