perf(codegen): retain guarded array accumulators as i32 - #8613
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 (7)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change propagates numeric-array parameter proofs into native fact collection. Guarded numeric-array reads can seed exact i32 analysis after valid root-level normalization. Bitwise lowering consumes the proof, and tests verify canonical i32 representation without ChangesGuarded numeric-array i32 optimization
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to This change specializes guarded numeric array code generation to retain i32 values and reports substantial benchmark improvements while preserving the generic fallback; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant FunctionSpecialization
participant NativeFactGraph
participant I32LocalCollector
participant BitwiseLowering
FunctionSpecialization->>NativeFactGraph: pass numeric-array parameter proofs
NativeFactGraph->>I32LocalCollector: pass guarded numeric-array IDs
I32LocalCollector->>I32LocalCollector: classify reads and root-level exact normalization
I32LocalCollector->>BitwiseLowering: provide region-proven i32 expressions
BitwiseLowering->>BitwiseLowering: lower bitwise operands without js_number_coerce
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
number[]parameter proofs into native-region fact collectiontyped_array result
Exact issue workload, three-run medians on this host:
The specialized
encipherUntypedfunction contains zerojs_number_coercecalls after this change. Output remainschecksum:-821955270.Validation
cargo test -p perry-codegen --lib(1,163 passed, 1 ignored)cargo test --release -p perry-codegen --lib(1,163 passed, 1 ignored)cargo clippy -p perry --binscargo check -p perryperry,perry-runtime-static, andperry-stdlib-staticNo version bump.
Fixes #8606
Summary by CodeRabbit