SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

72125 0 12 Python

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.
V
Vladimir Matveev committed
2b05361bf7cbbd76035206fd9befe87f37489f1e
Parent: ec8a15b
Committed by GitHub <noreply@github.com> on 9/19/2020, 1:38:38 AM