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
{{ message }}
Repository navigation
Some (mostly) easy ways to reduce the size of JIT generated code #145742
Most uses of _SET_IP are setting the ip just in case something wants to inspect it. For these cases, we could store a 16 bit offset instead of the full 64 bit pointer. Code that reads the instruction pointer would need updating, but this should reduce the overhead of _SET_IP by more than half.
_LOAD_CONST_INLINE_BORROW and similar
We can do the tagging when generating the code, instead of while executing. This only saves a single instruction, but it helps.
_LOAD_FAST_BORROW
We already replicate _LOAD_FAST_BORROW, but that still leaves most _LOAD_FAST_BORROW using the slower version, and bloating the stencils.
We could manually generate the code, it is only a couple of instructions, reducing stencil bloat and covering all operands
Activity
corona10 commentedon Mar 24, 2026
I’ll take a look at this issue and sync with @Fidget-Spinner on the approach.
Fidget-Spinner commentedon Mar 24, 2026
Specifically @corona10 is taking up
_LOAD_CONST_INLINE_BORROWfolding.pythongh-145742: Pre-tag operands for _LOAD_CONST_INLINE_BORROW variants
Merge remote-tracking branch 'upstream/main' into pythongh-145742-work
Merge remote-tracking branch 'upstream/main' into pythongh-145742-work
pythongh-145742: Manually emit _LOAD_FAST_BORROW to reduce stencil bloat
Merge remote-tracking branch 'upstream/main' into pythongh-145742-impl
Merge remote-tracking branch 'upstream/main' into pythongh-145742-work
Merge remote-tracking branch 'upstream/main' into pythongh-145742-impl
pythongh-145742: Fix cross-block adrp+ldr to movz optimization on AAr…
Merge remote-tracking branch 'upstream/main' into pythongh-145742-work
Merge remote-tracking branch 'upstream/main' into pythongh-145742-work
Merge remote-tracking branch 'upstream/main' into pythongh-145742-work
Merge branch 'main' into pythongh-145742-work