3 ms·
Async python is faster when you use it for running parallel tasks. In this benchmark, you are running a single database request per query, so there is no advant
by lovasoa 6y ago
Async python is faster when you use it for running parallel tasks. In this benchmark, you are running a single database request per query, so there is no advantage to being asynchronous: a pool of processes will scale just as well (but it will use more memory). The point of async is that it lets you easily make a Postgres query, AND an HTTP query, AND a redis query in parallel.