From 2b05361bf7cbbd76035206fd9befe87f37489f1e Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 18 Sep 2020 18:38:38 -0700 Subject: bpo-41756: Introduce PyGen_Send C API (GH-22196) The new API allows to efficiently send values into native generators and coroutines avoiding use of StopIteration exceptions to signal returns. ceval loop now uses this method instead of the old "private" _PyGen_Send C API. This translates to 1.6x increased performance of 'await' calls in micro-benchmarks. Aside from CPython core improvements, this new API will also allow Cython to generate more efficient code, benefiting high-performance IO libraries like uvloop. --- Doc/data/refcounts.dat | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Doc/data') diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat index 355a4d6d3f..6b1bde3796 100644 --- a/Doc/data/refcounts.dat +++ b/Doc/data/refcounts.dat @@ -959,6 +959,11 @@ PyGen_NewWithQualName:PyFrameObject*:frame:0: PyGen_NewWithQualName:PyObject*:name:0: PyGen_NewWithQualName:PyObject*:qualname:0: +PyGen_Send:int::: +PyGen_Send:PyGenObject*:gen:0: +PyGen_Send:PyObject*:arg:0: +PyGen_Send:PyObject**:presult:+1: + PyCoro_CheckExact:int::: PyCoro_CheckExact:PyObject*:ob:0: -- cgit v1.2.1