Repeated optimizations in tier 2, due to the optimizer "failing" when it cannot optimize perfectly. #117066
Copy link
Copy link
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Mar 20, 2024 - addedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage
on Mar 20, 2024 - added a commit that references this issue
on Mar 20, 2024 - added 2 commits that reference this issue
on Apr 2, 2024
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
The tier 2 optimizer fails whenever it cannot optimize the entire trace, which results in a large number of repeated attempts to optimize the same code.
While we should add some form of backoff #116968 to mitigate this, we should also fix the root cause.
If the optimizer can only optimize up to some point in the code, it should not throw away the work it has done.
Linked PRs