Conversation
orizi
force-pushed
the
orizi/09-09-perf_avoid_heap_allocs_reading_blake2s_opcode_operands
branch
from
September 9, 2026 08:39
ea80396 to
7f03670
Compare
|
Benchmark Results for unmodified programs 🚀
|
orizi
force-pushed
the
orizi/09-09-perf_avoid_heap_allocs_reading_blake2s_opcode_operands
branch
2 times, most recently
from
September 9, 2026 10:06
2ecfcfa to
cbd96ff
Compare
Read the state and message via a new get_u32_array (const-generic stack array) instead of get_u32_range's Vec. The Blake2sInvalidOperand error was unreachable (the vec always had the requested size on success) and is removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
orizi
force-pushed
the
orizi/09-09-perf_avoid_heap_allocs_reading_blake2s_opcode_operands
branch
from
September 9, 2026 10:17
cbd96ff to
2c43ce0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## claude/vm-execution-performance-32hi0c #2397 +/- ##
=======================================================================
Coverage 96.23% 96.23%
=======================================================================
Files 107 107
Lines 37985 37990 +5
=======================================================================
+ Hits 36555 36560 +5
Misses 1430 1430 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Read the Blake2s state and message via a new
get_u32_array(const-generic stack array) instead ofget_u32_range'sVec— two heap allocations per Blake instruction removed.BREAKING: the
Blake2sInvalidOperanderror variant was unreachable (the vec always had the requested size on success) and is removed.Based on #2391.
🤖 Generated with Claude Code
Performance
Expected: removes two heap allocations (a
Vec<u32>of 8 and of 16) per Blake2s opcode instruction — relevant only to Stwo-style programs using the Blake opcode, roughly proportional to their Blake instruction density.Measured (best-of-7 vs parent #2391 branch, local; noise ±2.4%): the standard benchmark suite contains no Blake-opcode programs, so the direct effect is not exercised. The suite nonetheless showed a consistent −1% to −9% (all 12 benchmarks negative, e.g. big_factorial −8.8%, big_fibonacci −7.3%); since the touched code is unreachable in these programs, that is most plausibly a code-layout/alignment side effect of the error-variant removal rather than an attributable algorithmic gain — treat the direct win as unmeasured pending a Blake-opcode workload.
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