Avoid redundant proof merge rows for eager current values - #928
Conversation
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout. (16)
🧰 Additional context used📓 Path-based instructions (1)**/*.{md,txt,rs}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🔇 Additional comments (5)
📝 WalkthroughSummary by CodeRabbitBug Fixes
Tests
Walkthrough
Changesmerge_current proof cleanup
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #928 +/- ##
==========================================
+ Coverage 86.54% 86.56% +0.02%
==========================================
Files 89 89
Lines 26804 26835 +31
==========================================
+ Hits 23197 23231 +34
+ Misses 3607 3604 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance
Comparing Footnotes
|
|
I'm working on #933, which hopefully will replace this. We'll keep this open as an option for now |
Summary
:merge oldfunction.Why
This is needed for eggcc proof export to finish in reasonable time. The old proof encoding could keep every candidate proof-view row for a merged function and then run
@merge_ruleover every pair. For selector/eager merges, the backend already knows the current value, so those pairwise proof merges are redundant when the selected row already has a proof witness.Slow Example
A generated file with this shape was slow before this change and is faster now:
Run with proof mode, for example:
On the same 3000-candidate file:
@merge_rule = 4,498,500,@merge_cleanup = 4,498,500, wall time about7.04s@merge_rule = 0,@merge_current_cleanup = 2,999, wall time about4.61sThe wall-time improvement is partially hidden by parsing and report overhead, but the quadratic proof-merge work is eliminated for this selector case.
Validation
cargo test --release --test proof_selector_mergegit diff --check