-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
GH-105848: Get rid of KW_NAMES
(again)
#108496
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I might have messed something up. Benchmarking came back 2% slower with wonky stats. |
I see a few ways to make this faster.
Option 2 sounds a lot simpler, if a bit slower. Unless we go with option 1, we are going to see a lot more My guess is that with option 2, and the the superinstructions, there won't be much of a slowdown. |
(And please add a link to the stats/performance numbers) |
(The stats issue I observed was in the comparison vs main, and is unrelated.) So, here's the current situation. This branch adds over 7 billion new I tried the "easy" route of adding a new So, it seems that clearly something needs to be done, but superinstructions aren't going to help. I'll try some of the other suggested ideas tomorrow, but in general this is getting to be a pretty annoying problem. |
That's disappointing; it would seem that moving kwnames to the tstate makes most sense to try next? |
Moving keyword names to the |
Sticking it on the |
Off-line we decided to at least look at splitting CALL into two separate opcode families, CALL and CALL_KW. Looking at the specializations, most of them seem to either insist on no keywords (the majority), or insist on keywords. There are only a few specializations that need to handle either case. So we would not be adding many new opcodes, and the split makes the specialization more efficiently. Using uops we could avoid having more code. Of course, we (Brandt :-) still have to code this and benchmark it before we can be sure of those predictions -- this has been a surprising adventure so far. |
Closing in favor of the |
This is an updated version of #105849.
CALL
sequence #105848📚 Documentation preview 📚: https://cpython-previews--108496.org.readthedocs.build/