Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise foreach on builtin::indexed #22641

Draft
wants to merge 3 commits into
base: blead
Choose a base branch
from

Commits on Oct 2, 2024

  1. op.c: Rename 'iterflags' to 'enteriterflags' because it relates to th…

    …e OP_ENTERITER and not OP_ITER
    leonerd committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    b888753 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c72c71 View commit details
    Browse the repository at this point in the history
  3. Optimise foreach on a list from builtin::indexed @array into two lexi…

    …cals
    
    Rather than generating an entire temporary list that is twice as big as
    the original array, instead set a flag on the `OP_ITER` that tells it to
    set one of the iteration variables to the current array index and use
    the same `CXt_LOOP_ARY` optimisation that regular foreach over an array
    would use.
    leonerd committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    f3d8512 View commit details
    Browse the repository at this point in the history