Skip to content

gh-148171: Convert CALL_BUILTIN_FAST to leave inputs on the stack for refcount elimination in JIT#148172

Open
Fidget-Spinner wants to merge 5 commits intopython:mainfrom
Fidget-Spinner:pop_top_calls
Open

gh-148171: Convert CALL_BUILTIN_FAST to leave inputs on the stack for refcount elimination in JIT#148172
Fidget-Spinner wants to merge 5 commits intopython:mainfrom
Fidget-Spinner:pop_top_calls

Conversation

@Fidget-Spinner
Copy link
Copy Markdown
Member

@Fidget-Spinner Fidget-Spinner commented Apr 6, 2026

@Fidget-Spinner
Copy link
Copy Markdown
Member Author

Results are pretty good. 7% faster on call microbenchmark:

from _testcapi import meth_fastcall

def testfunc(n):
    x = 0
    for _ in range(n):
        meth_fastcall(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
    return x

testfunc(20000000)

Summary
  PYTHON_JIT_STRESS=1 ./python ../add_int.py ran
    1.07 ± 0.10 times faster than PYTHON_JIT_STRESS=1 ../cpython_jit_pgo_tc_0/python ../add_int.py
  

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants