In this article, Khaleel Al-Adham finds some speed ups in ast.walk by converting generators to lists
https://reflex.dev/blog/why-ast-walk-when-you-can-ast-sprint/
These are all fair enough, though I wonder if there is scope for the JIT to speed up some of the constructs found here, since this way of using yields (having a few levels of functions that all yield through), looks like a fairly common pattern.
Of course a work-around is to bring the fixes into CPython, but I wonder is there anything the JIT can know that can speed things up without doing that ?
In this article, Khaleel Al-Adham finds some speed ups in ast.walk by converting generators to lists
https://reflex.dev/blog/why-ast-walk-when-you-can-ast-sprint/
These are all fair enough, though I wonder if there is scope for the JIT to speed up some of the constructs found here, since this way of using yields (having a few levels of functions that all yield through), looks like a fairly common pattern.
Of course a work-around is to bring the fixes into CPython, but I wonder is there anything the JIT can know that can speed things up without doing that ?