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 by bedevere-bot
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_ITER
to leave iterator and value on the stack when exiting GH-96793: ChangeFOR_ITER
to not pop the iterator on exhaustion. #96801FOR_ITER
for generators GH-96793: Specialize FOR_ITER for generators. #98772SEND
for coroutinesEdited:
Remove the requirement for a
GEN_RETURN_VALUE
instruction. We might want one to simplify frame popping, but it isn't needed for specializing.The text was updated successfully, but these errors were encountered: