This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients asvetlov, gvanrossum, methane, ned.deily, vstinner, yselivanov
Date 2016-10-27.16:32:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-10-27 16:33:12yselivanovsetrecipients: + yselivanov, gvanrossum, vstinner, ned.deily, asvetlov, methane
2016-10-27 16:33:11yselivanovsetmessageid: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za>
2016-10-27 16:33:11yselivanovlinkissue28544 messages
2016-10-27 16:33:10yselivanovcreate