Skip to content

perf(jit): consolidate feedback and tier-state lookups - #20

Open
huacnlee wants to merge 1 commit into
perf/m3-native-timing-stackfrom
perf/m3-feedback-lookups
Open

perf(jit): consolidate feedback and tier-state lookups#20
huacnlee wants to merge 1 commit into
perf/m3-native-timing-stackfrom
perf/m3-feedback-lookups

Conversation

@huacnlee

@huacnlee huacnlee commented Sep 5, 2026

Copy link
Copy Markdown
Member

Issue # (if available)

Stacked follow-up to #19; review this diff against perf/m3-native-timing-stack.

Description of changes

Consolidate observe_type and observe_call into 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 in record_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

  • Added change to the changelog
  • Created unit tests for my feature if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant