You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using inline caches has some nice advantages in terms of cache locality, and should get us a several percent speedup, but not if it makes all jumps slower due to extra EXTENDED_ARG instructions.
As an initial implementation, we will keep all the original jump instructions (including FOR_ITER) and just make them two "code units" long.
The second oparg be the low 8 bits of the jump. Jumps over 2**16 can use EXTENDED_ARG as before.
The change is simple, all jump instructions get this extra code at the start:
Discussed in #297
Using inline caches has some nice advantages in terms of cache locality, and should get us a several percent speedup, but not if it makes all jumps slower due to extra
EXTENDED_ARG
instructions.As an initial implementation, we will keep all the original jump instructions (including
FOR_ITER
) and just make them two "code units" long.The second oparg be the low 8 bits of the jump. Jumps over 2**16 can use
EXTENDED_ARG
as before.The change is simple, all jump instructions get this extra code at the start:
The compiler will need to account for the addition offset, but that should be simple.
We can then implement a more principled approach later. Ideally, for 3.11 if we have time.
The text was updated successfully, but these errors were encountered: