-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
We're getting a JIT. Now it's time to optimize the traces to pass them to the JIT. The following workstreams are somewhat parallel, and split into two parts. They will not necessarily land in order.
- The specializer. This will be done as its own pass on uops. Please see Mark's issue here Superblock optimization: Specialization faster-cpython/ideas#560.
- The uops optimizer. This is a separate pass. In general there are two parts, uops abstract interpretation, and optimized code generation. Please see this document for more information. The following optimizations are targeted:
- Value numbering
- Type + constant propagation
- True function inlining
- [x] Interpreter DSL changes. https://github.com/python/cpython/pull/113711
- [ ] https://github.com/python/cpython/issues/114058
- [ ] https://github.com/python/cpython/issues/115419
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-113710: Add types to the interpreter DSL #113711
- GH-113710: Add a peephole optimization pass. #114487
- GH-113710: Add a "globals to constants" pass #114592
- GH-113710: Backedge counter improvements. #115166
- GH-113710: Fix updating of dict version tag and add watched dict stats #115221
- GH-113710: Improve
_SET_IP
and_CHECK_VALIDITY
#115248 - GH-113710: Tier 2 optimizer: check the function instead of checking globals. #116410
- GH-113710: Fix optimization of globals using
_CHECK_FUNCTION
#116460
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-featureA feature request or enhancementA feature request or enhancement