Repository navigation
Specialize COMPARE_OP #90043
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage
Description
Activity
Some specialization statistics:
https://gist.github.com/sweeneyde/49cc3a9d074d56cf095cb0a42d13d7a4
Including 3 opcodes: COMPARE_OP_INT and COMPARE_OP_FLOAT and COMPARE_OP_STR (equality only) seems to give pretty good specialization numbers, better than just 2.
- added3.11only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage
on Nov 23, 2021 Is COMPARE_OP worth specializing by itself?
Most comparisons are followed by a jump, and much of the overhead is in the branching around the choice of operator as well as pushing and popping (with inc/decrefs) a value that has only one bit of information (True/False).
- added a commit that references this issue
on Dec 16, 2022 - added a commit that references this issue
on Dec 18, 2022
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage
COMPARE_OPwhen collecting stats #31516Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
COMPARE_OP_FLOAT_JUMP#100278