perf(codegen): speed up generic registry pipelines - #8614
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change adds guarded numeric lowering for null-defaulted additions and array-field caching for eligible contained receivers. It updates clone compilation and dispatch routing, and adds IR, routing, runtime, and changelog coverage. ChangesPipeline optimizations
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant Caller
participant DynamicDispatch
participant ArrayCacheClone
participant PShapeClone
Caller->>DynamicDispatch: invoke instance method
DynamicDispatch->>ArrayCacheClone: select cached clone for proven receiver
DynamicDispatch->>PShapeClone: select shape clone for aliased receiver
sequenceDiagram
participant ExpressionLowering
participant NumericGuard
participant DynamicAddition
ExpressionLowering->>NumericGuard: detect null-defaulted value plus literal
NumericGuard->>DynamicAddition: retain fallback for non-numeric values
DynamicAddition-->>ExpressionLowering: emit guarded numeric control flow
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merging as a validated batch of three, stacked on current
Ratchets re-run against the current baseline immediately before merge. #8610's ratchet debt is resolved. It was held twice for +2 bare raw-handle reads in #8613 and #8614 are aimed at the two tickets filed after the last sweep — #8606 ( Two metadata fixes applied while staging (fork PRs, so they could not be pushed to the branches): #8610 shipped without a |
Summary
Speeds up the pipeline benchmark by keeping stable array-valued fields in local slots for methods called on proven-contained receivers, and by adding a guarded numeric fast path for null-defaulted dynamic counters. Dynamic JavaScript behavior and aliased receiver routes retain their existing fallbacks.
Changes
Related issue
Closes #8607
Test plan
The private m0810 20-row acceptance corpus referenced by repository notes is not present in this checkout; the public pipeline workload and the added parity fixture are byte-exact.
Benchmark
Apple M1 mini, quiet host. Wall spread is 20 shuffled/interleaved five-process batches, normalized per process; batching avoids the 10 ms resolution of macOS /usr/bin/time. Counters are 20 shuffled/interleaved single-process runs. Baseline is 970eab3; final is this branch.
Final versus baseline: 18.5% lower wall time with disjoint ranges, 16.3% fewer instructions, 18.7% fewer cycles, and unchanged peak RSS. Final is 8.4% faster than Node by median wall time on this host.
Screenshots / output
pipeline output from both Perry and Node:
Checklist
Summary by CodeRabbit
Performance Improvements
Bug Fixes
Tests