New submission from Yury Selivanov: The attached patch implements asyncio.Task in C. Besides that, it also implements Argument Clinic for C Future.
Performance improvement on a simple echo server implementation using asyncio.streams: Python Future & Task | C Future & Py Task | C Future & C Task 23K req/s | 26K | 30K | ~10-15% boost | ~15% Both Task and Future implemented in C, make asyncio programs up to 25-30% faster. The patch is 100% backwards compatible. I modified asyncio tests to cross test Tasks and Futures implementations, i.e. to run Task+Future, Task+CFuture, CTask+Future, CTask+CFuture tests. No refleaks or other bugs. All uvloop functional tests pass without any problem. Ned, Guido, are you OK if I merge this in 3.6 before beta 3? I'm confident that the patch is stable and even if something comes up we have time to fix it or even retract the patch. The performance boost is very impressive, and I can also make uvloop simpler. ---------- assignee: yselivanov components: asyncio files: ctask.patch keywords: patch messages: 279546 nosy: asvetlov, gvanrossum, haypo, inada.naoki, ned.deily, yselivanov priority: normal severity: normal stage: patch review status: open title: Implement asyncio.Task in C type: performance versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45242/ctask.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28544> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com