perf(interp): cut trace loop iteration overhead#159
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 (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds ChangesNative loop optimization
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant compiler.compile
participant arm64Lowerer
participant journalBudget
participant trapYield
compiler.compile->>arm64Lowerer: emit nativeLoop
arm64Lowerer->>arm64Lowerer: emit OpPseudoUse and back edge
arm64Lowerer->>journalBudget: decrement or persist budget
arm64Lowerer->>trapYield: yield when budget is exhausted
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@interp/jit_arm64_test.go`:
- Around line 1735-1740: Update the vm_jit_entry_bytes_total validation in the
test to require that a metric with label kind=loop is encountered, then assert
its value remains below 16<<10. Ensure the test fails when no matching loop
metric sample is emitted while preserving the existing size assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2922a0c7-6a45-498e-aae9-b0caa0a47476
📒 Files selected for processing (9)
AGENTS.mdasm/assembler.goasm/assembler_test.goasm/instr.goasm/instr_test.godocs/jit-internals.mdinterp/jit.gointerp/jit_arm64.gointerp/jit_arm64_test.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
=======================================
Coverage 29.68% 29.69%
=======================================
Files 86 86
Lines 60350 60357 +7
=======================================
+ Hits 17915 17922 +7
- Misses 41157 41160 +3
+ Partials 1278 1275 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Closes #156.
Verification
go test ./asm/... ./interp -count=1make checkgo test -race ./...git diff --checkBenchmarks
Focused ARM64 results from the branch:
BenchmarkControl_Sieve/jit: 4.17-4.26 us/opBenchmarkControl_Sieve/threaded: 15.82-15.91 us/opBenchmarkMemory_TypedArraySum/jit: 611-625 ns/opBenchmarkMemory_TypedArraySum/threaded: 6.15-6.21 us/opSummary by CodeRabbit