Conversation
orizi
force-pushed
the
orizi/09-09-refactor_replace_closure_validation_rules_with_an_enum
branch
from
September 9, 2026 08:39
3a248f1 to
c4f676d
Compare
|
Benchmark Results for unmodified programs 🚀
|
orizi
force-pushed
the
orizi/09-09-refactor_replace_closure_validation_rules_with_an_enum
branch
from
September 9, 2026 09:47
c4f676d to
1227f4f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## claude/vm-execution-performance-32hi0c #2395 +/- ##
=======================================================================
Coverage 96.23% 96.23%
=======================================================================
Files 107 107
Lines 37985 37978 -7
=======================================================================
- Hits 36555 36549 -6
+ Misses 1430 1429 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
orizi
force-pushed
the
orizi/09-09-refactor_replace_closure_validation_rules_with_an_enum
branch
from
September 9, 2026 10:06
1227f4f to
85c0659
Compare
Only two validation rules exist (range-check and signature), so the boxed-closure ValidationRule mechanism was overdesign. Replace it with an enum holding both rules; the signature rule keeps its shared signatures map directly instead of capturing it in a closure. BREAKING: ValidationRule and Memory::add_validation_rule are now pub(crate). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
orizi
force-pushed
the
orizi/09-09-refactor_replace_closure_validation_rules_with_an_enum
branch
from
September 9, 2026 10:17
85c0659 to
ca05e6f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only two validation rules exist (range-check and signature), so the boxed-closure
ValidationRulemechanism was overdesign. Replace it with an enum holding both rules; the signature rule keeps its shared signatures map directly instead of capturing it in a closure.BREAKING:
ValidationRuleandMemory::add_validation_ruleare nowpub(crate).Based on #2391.
🤖 Generated with Claude Code
Performance
Expected: none — this is a code-size/complexity refactor. The allocation win for range-check validation (the hot rule) already landed in #2391; the signature rule runs
verifyper instance, where a boxed-closure call is immeasurable.Measured (best-of-7 vs parent #2391 branch, local; noise ±2.4%): all 12 benchmarks within noise (−3.0% to +4.7%, mixed signs, no consistent direction). As expected, no performance change.
Methodology:
cairo_programs/benchmarks/*.cairocompiled with cairo-lang 0.14--proof_mode, run viacairo-vm-cli <prog>.json --layout all_cairo --proof_mode, hyperfine best-of-7 per binary, local x86-64 Linux. Noise floor (identical-code control pair): ±2.4%.This change is