Skip to content

AST walk highlights slower yields #740

Description

@stuaxo

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions