Uh oh!
There was an error while loading. Please reload this page.
gh-131798: optimize through keyword and bound method calls in the JIT - #148466
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| def test_call_kw(self): | ||
| def func(a): | ||
| return 42 * a |
There was a problem hiding this comment.
We should be checking that we optimize through the trace. So the best way is to put a global (e.g. range) here and check if it gets promoted in the tests below. See for example test_init_resolves_callable which does self.assertNotIn("_LOAD_GLOBAL_BUILTINS", uops). Same for the other test.
Fidget-Spinner
commented
Apr 13, 2026
It's not optimizing through the bound method because we're missing |
Fidget-Spinner
left a comment
There was a problem hiding this comment.
Thanks! This should be a pretty decent win.
Uh oh!
There was an error while loading. Please reload this page.
…he JIT (pythonGH-148466) Co-authored-by: Ken Jin <kenjin4096@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.