perf(jit): consolidate feedback and tier-state lookups - #20
Open
huacnlee wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue # (if available)
Stacked follow-up to #19; review this diff against
perf/m3-native-timing-stack.Description of changes
Consolidate
observe_typeandobserve_callinto one B-tree entry lookup, preserving occupied-at-capacity updates, rejected-entry accounting, exact feedback versions, and independent call-slot growth. Cache baseline tier state once after maintenance inrecord_hot; successful direct refresh returns before that cached value is reused.Add three characterization tests covering the capacity, generation, version and megamorphic edges. Deliberate capacity and arity mutations fail the corresponding tests. Validation: 518 release runtime tests, 82 targeted ASAN/LSAN tests, workspace Clippy and formatting pass; independent code review found no issues.
Five full 5/30/10 paired diagnostics compare the cumulative timing-stack plus query changes with merged M3
a38bd01, using identical corrected harnesses and independently balanced engine order. Generic Tier 1 is 1.193x baseline speed (95% interval 1.190x–1.197x), generic automatic is 1.181x (1.175x–1.185x), and recursive Tier 1 is 1.187x (1.183x–1.189x). Generic requested Tier 2 and automatic still execute Tier 1. Direct-call, property and interpreter comparisons are statistically tied. These results do not isolate either commit's contribution or replace complete clean-source acceptance.Archive raw evidence and a property profile: helper-frame validation remains the main sampled property cost. Document the next bounded ownership optimization and its safety constraints; property lowering itself is unchanged in this PR.
Checklist