Enable specialization of iteration over generators, for gen():, and awaiting coroutines, await coro()
#96793
Labels
performance
Performance or resource usage
markshannon commentedSep 13, 2022
•
edited
We want to be able to specialize iteration over generators and awaiting coroutines. Both for PEP 659 and for higher tier optimizers.
For the theory see faster-cpython/ideas#457
To do this we need:
FOR_ITERto leave a value on the stack when exiting.GEN_RETURN_VALUEinstruction to allow the return instruction to clean up the frame.FOR_ITERfor generatorsSENDfor coroutinesThe text was updated successfully, but these errors were encountered: