classification
Title: Optimize asyncio.gather()
Type: performance Stage: resolved
Components: asyncio Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: yselivanov Nosy List: asvetlov, yselivanov
Priority: normal Keywords: patch

Created on 2017-12-18 02:41 by yselivanov, last changed 2017-12-19 12:20 by yselivanov. This issue is now closed.

Files
File name Uploaded Description Edit
t.py yselivanov, 2017-12-18 02:41
Pull Requests
URL Status Linked Edit
PR 4913 merged yselivanov, 2017-12-18 02:43
Messages (2)
msg308508 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-18 02:41
asyncio.gather can be made faster if:

1. we don't use functools.partial
2. create less intermittent collections
3. drop unnecessary code (e.g. gather has some code that's duplicated in ensure_future that it uses etc)

The proposed PR makes asyncio.gather 10-15% faster on the attached benchmark.
msg308632 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-19 12:19
New changeset 36c2c044782997520df7fc5604742a615ccf6b17 by Yury Selivanov in branch 'master':
bpo-32355: Optimize asyncio.gather() (#4913)
https://github.com/python/cpython/commit/36c2c044782997520df7fc5604742a615ccf6b17
History
Date User Action Args
2017-12-19 12:20:10yselivanovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-12-19 12:19:55yselivanovsetmessages: + msg308632
2017-12-18 02:43:10yselivanovsetkeywords: + patch
stage: patch review
pull_requests: + pull_request4807
2017-12-18 02:41:07yselivanovcreate