Skip to content

perf(history_map): arena-allocate ElementWithHistory#669

Draft
0xVolosnikov wants to merge 4 commits into
draft-0.4.0from
vv/history-map-arena
Draft

perf(history_map): arena-allocate ElementWithHistory#669
0xVolosnikov wants to merge 4 commits into
draft-0.4.0from
vv/history-map-arena

Conversation

@0xVolosnikov
Copy link
Copy Markdown
Contributor

What ❔

Sibling experiment to #668 (Box variant). Allocates ElementWithHistory from a fixed-page ListVec arena (element_with_history_arena.rs) instead of one Box::new_in per element. BTreeMap stores NonNull pointers into the arena; pending-updates list stores those same pointers. Same K-embedding inside ElementWithHistory as #668 so callbacks/iterators surface &K without a BTreeMap lookup.

Affected:

  • zk_ee/src/common_structs/history_map/mod.rs
  • zk_ee/src/common_structs/history_map/element_with_history.rs
  • zk_ee/src/common_structs/history_map/element_with_history_arena.rs (new)

Why ❔

Same goal as #668 — bypass BTreeMap descents on the bookkeeping paths and skip K::clone on every update(). This variant additionally amortizes the per-element allocation over arena pages, matching the existing ElementPool style for HistoryRecord.

Benchmark results

Same origin/draft-0.4.0 baseline as #668, same block fixtures.

Arena vs baseline:

Block Base eff Head eff Δ
19299001 208,601,280 203,929,011 −2.24 %
22244135 134,741,585 132,059,796 −1.99 %

Head-to-head vs the Box variant (#668):

Block Box (A) head Arena (B) head B − A
19299001 204,530,358 203,929,011 −601 k (−0.29 %)
22244135 132,440,306 132,059,796 −381 k (−0.29 %)

Delegation counts identical across all four runs; pure raw-cycle savings.

So Option B adds ~+0.3 % on top of A. The bulk of the win (BTreeMap-descent and K::clone elimination) is already captured by A; B's additional savings come from collapsing Box::new_in calls into one allocation per arena page.

Forward-mode expectations

Forward execution has real CPU caches and TLB. The arena layout packs ~32 ElementWithHistory per page vs scattered Box heap slots, so B should be modestly more cache- and TLB-friendly there (HistoryMap is rarely the forward-mode bottleneck though). Not measured — the project doesn't currently surface a forward-mode wall-clock benchmark.

Is this a breaking change?

  • Yes
  • No

Public API of HistoryMap, HistoryMapItemRef, HistoryMapItemRefMut is preserved.

Relationship to #668

This PR and #668 implement the same idea (stable-address ElementWithHistory + pointer-only pending list) with different storage strategies. Only one should land. Numbers above are the input for that decision.

Checklist

  • PR title corresponds to the body of PR.
  • Tests for the changes have been added / updated. (Same miri_* and rig-style HistoryMap tests cover the arena paths; internal ElementWithHistory tests updated for the new K type parameter.)
  • Documentation comments have been added / updated.
  • Code has been formatted.

0xVolosnikov added a commit that referenced this pull request May 20, 2026
## What ❔

Replaces `Bytes32`'s `Ord` impl on **the RISC-V proving target only**
with a word-by-word equality scan over the underlying `inner: [usize;
BYTES32_USIZE_SIZE]` (N=4 on 64-bit, 8 on RISC-V32):

- Equal-prefix iterations stay in the fast path: load word, compare
word, branch.
- On the first differing word, resolve byte-lex order by walking the
bytes of just that word — cheaper than `swap_bytes()` on RV32 without
the Zbb extension (which this target does not enable).
- `cmp` / `partial_cmp` are `#[inline]` since they sit on the BTreeMap
descent hot path.

On non-RV32 targets (forward / sequencer host) the impl falls back to
the original `as_u8_array_ref().cmp(...)`. libc's `memcmp` is already
SIMD-vectorized (SSE2/AVX/NEON), so the byte path beats a pure-Rust word
loop on the host. The chunked helper (`cmp_word_chunked`) is still
compiled on every target so the equivalence tests can validate it on the
host.

Affected:
- `zk_ee/src/utils/bytes32.rs`

## Why ❔

From the flamegraph analysis on `draft-0.4.0`:

- `impls::compare_bytes` is the **second-highest self-cost function in
the binary at 6.47 %**. On no-std RISC-V the `<[u8]>::cmp` path falls
back to `compiler-builtins`' generic `memcmp`
(`compiler-builtins/src/mem/impls.rs:388`) — a plain byte loop with no
chunking.
- Almost all of that self-cost is reached through `Bytes32::cmp`
(directly, or via `WarmStorageKey::cmp` → `Bytes32::cmp`) sitting inside
`NodeRef::find_key_index` in HistoryMap / preimage /
FlatStorageCommitment lookups.

Comparing word-aligned 32-byte values byte-by-byte is wasteful when the
struct is already a `[usize; N]` with `align(8)`. Forward mode doesn't
need the rewrite because libc memcmp already handles it efficiently.

## Benchmark results

Branch vs `origin/draft-0.4.0` (commit `59bdedfa`):

| Block | Base eff | Head eff | Δ eff | Δ raw |
|---|---|---|---|---|
| `19299001` | 208,601,280 | 204,648,699 | **−1.89 %** | **−2.49 %** |
| `22244135` | 134,741,585 | 132,504,954 | **−1.66 %** | **−2.10 %** |

Blake / Bigint / Keccak delegation counts unchanged in both runs — pure
raw-cycle reduction.

### Variant comparison (RV32 only — host path is unchanged)

| Variant | block 19299001 Δ eff | block 22244135 Δ eff |
|---|---|---|
| word-cmp + `to_be()` bswap on mismatch | −1.56 % | −1.39 % |
| **word-cmp + `#[inline]` + byte-fallback (this PR)** | **−1.89 %** |
**−1.66 %** |
| word-cmp + 2-word XOR-OR fusion | −1.68 % | −1.45 % |

The 2-word XOR-OR variant regresses vs the simple loop — the extra
arithmetic per executed iteration doesn't pay for the halved branch
count on RV32. Picked the byte-fallback variant.

## Is this a breaking change?
- [ ] Yes
- [x] No

Public API of `Bytes32` is unchanged. `Ord` / `PartialOrd` impls produce
identical orderings to the previous implementation on every target
(verified by `cmp_tests::cmp_matches_byte_lex_on_pseudorandom_pairs`,
which invokes `cmp_word_chunked` directly so the helper is exercised on
the host too).

## Stackability with #668 / #669

This PR targets the leaf `compare_bytes` cost; #668 / #669 target the
BTreeMap lookups themselves on the pending-list paths. They hit
different code regions and are expected to compose (overlap only where
BTreeMap node descent invokes `Bytes32::cmp` — and even there the
per-compare cost goes down).

## Checklist

- [x] PR title corresponds to the body of PR.
- [x] Tests for the changes have been added / updated. (Equivalence
tests added: `cmp_matches_byte_lex_on_handcrafted_pairs`,
`cmp_matches_byte_lex_on_pseudorandom_pairs`. Both invoke
`cmp_word_chunked` directly so the chunked path is exercised on the
host.)
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@0xVolosnikov 0xVolosnikov force-pushed the vv/history-map-arena branch from 7e50da0 to f237dc9 Compare May 20, 2026 12:57
@0xVolosnikov 0xVolosnikov requested a review from Copilot May 20, 2026 13:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes HistoryMap’s internal storage so ElementWithHistory values are arena-allocated in fixed-size ListVec pages, and both the BTreeMap and the pending-updates list store NonNull pointers into that arena. The goal is to reduce per-element allocation overhead and avoid key cloning / repeated BTreeMap descents on rollback/commit/pending-iteration paths.

Changes:

  • Store NonNull<ElementWithHistory<...>> in the BTreeMap and in pending_updated_elements, replacing key-based pending bookkeeping.
  • Embed K inside ElementWithHistory so callbacks/iterators can surface &K without looking back into the BTreeMap.
  • Introduce ElementWithHistoryArena backed by ListVec pages to amortize allocations across elements.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
zk_ee/src/common_structs/history_map/mod.rs Reworks HistoryMap to use stable arena pointers for map values and pending updates; updates rollback/commit/iter paths accordingly.
zk_ee/src/common_structs/history_map/element_with_history.rs Adds embedded key storage by introducing a new K type parameter and storing key: K in the element.
zk_ee/src/common_structs/history_map/element_with_history_arena.rs New arena wrapper around ListVec to allocate ElementWithHistory in fixed-size pages and return stable pointers.
Comments suppressed due to low confidence (1)

zk_ee/src/common_structs/history_map/element_with_history.rs:43

  • ElementWithHistory is a pub type in a pub module, and this change adds a new generic parameter K plus a new required key argument in new(). That is a breaking public API change for any downstream code that uses ElementWithHistory directly, which conflicts with the PR’s “not breaking” claim. If ElementWithHistory is meant to be internal, consider making the type/module pub(crate); otherwise consider preserving backward compatibility (e.g., a type alias or an alternate constructor).
/// The history linked list. Always has at least one item with the snapshot id of 0.
///
/// `key` is embedded so that the pending-updates list can store a stable pointer
/// to an `ElementWithHistory` and still surface the key on iteration without
/// going back through the BTreeMap.
pub struct ElementWithHistory<K, V, A: Allocator + Clone, EP = ()> {
    /// Key owned by this element (separate from the BTreeMap key copy).
    pub key: K,
    /// Additional properties associated with the element globally.
    /// These properties persist across rollbacks/commits and don't participate in snapshots
    pub element_properties: EP,
    /// Initial record (before history started)
    pub initial: HistoryRecordLink<V>,
    first: HistoryRecordLink<V>,
    /// Current history record
    pub head: HistoryRecordLink<V>,
    /// Record that has been committed, or initial if not commit has been
    /// performed.
    pub committed: HistoryRecordLink<V>,
    marker: PhantomData<A>,
}

impl<K, V, A: Allocator + Clone, KP> ElementWithHistory<K, V, A, KP> {
    #[inline(always)]
    pub fn new(
        key: K,
        key_properties: KP,
        initial_value: V,
        records_memory_pool: &mut ElementPool<V, A>,
    ) -> Self {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

use alloc::collections::btree_map::Entry;
use alloc::collections::BTreeMap;
use core::{alloc::Allocator, fmt::Debug, ops::Bound};
use core::{alloc::Allocator, fmt::Debug, ops::Bound, ptr::NonNull};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False positive — fmt::Debug is still referenced via the #[derive(Debug)] on NopSnapshotId and CacheSnapshotId further down in the same file. cargo clippy --workspace -- -D warnings passes cleanly against this exact commit; no action needed.

Comment on lines 104 to 110
// Releases the arena pages along with the `ElementWithHistory` values
// (and their owned keys). Pointers stored in `btree` or pending list
// would be dangling after this — but both have just been cleared.
self.elements_arena.clear();
self.state.next_snapshot_id = CacheSnapshotId(1);
self.state.frozen_snapshot_id = CacheSnapshotId(0);
self.state.pending_updated_elements = StackLinkedList::empty(self.state.alloc.clone());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 507ef38. HistoryMap::clear now drops the BTreeMap and the pending-updates list before releasing the arena pages, so the "every pointer stored in either container is valid" invariant holds at every observable point.

Comment on lines +41 to +42
.top_mut()
.expect("ListVec::top_mut must yield the slot we just pushed");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 507ef38. Added ListVec::push_returning_ref that uses LinkedList::back_mut (O(1)) instead of iter_mut().last() (O(pages)). allocate() now hits the back node directly without walking the chain twice.

Comment on lines +48 to +50
// LinkedList::clear drops the ArrayVec nodes, which in turn drop the
// contained ElementWithHistory values (and their owned keys).
self.buffer.0.clear();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 507ef38clear() now calls self.buffer.clear() via the Stack trait instead of reaching into ListVec's tuple field.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

zk_ee/src/common_structs/history_map/mod.rs:146

  • get_mut() / get_or_insert() still use a shared 's lifetime for both &mut self and the key reference, but the returned HistoryMapItemRefMut no longer stores &K. Consider changing these to accept key: &K (no 's parameter) so the mutable borrow of the map determines the output lifetime, rather than also requiring the caller's key borrow to live equally long.
    /// Get history of an element by key, mutable
    pub fn get_mut<'s>(&'s mut self, key: &'s K) -> Option<HistoryMapItemRefMut<'s, K, V, A, KP>> {
        let ptr = *self.btree.get(key)?;
        Some(HistoryMapItemRefMut {
            // Safety: pointer is valid for the lifetime of `&mut self`. We borrow
            // the arena element via the raw pointer rather than re-entering the
            // BTreeMap so that `cache_state` and `records_memory_pool` can be
            // borrowed mutably alongside.
            history: unsafe { &mut *ptr.as_ptr() },
            cache_state: &mut self.state,
            records_memory_pool: &mut self.records_memory_pool,
        })
    }

    /// Get history of an element by key or use callback to insert initial value
    pub fn get_or_insert<'s, E>(
        &'s mut self,
        key: &'s K,
        spawn_v: impl FnOnce() -> Result<(V, KP), E>,
    ) -> Result<HistoryMapItemRefMut<'s, K, V, A, KP>, E> {
        let ptr = match self.btree.entry(key.clone()) {
            Entry::Occupied(o) => *o.into_mut(),

Comment on lines 117 to 123
/// Get history of an element by key
pub fn get<'s>(&'s self, key: &'s K) -> Option<HistoryMapItemRef<'s, K, V, A, KP>> {
self.btree
.get(key)
.map(|ec| HistoryMapItemRef { key, history: ec })
self.btree.get(key).map(|ptr| HistoryMapItemRef {
// Safety: pointer is valid for the lifetime of `&self`.
history: unsafe { ptr.as_ref() },
})
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good observation — fixed in 2d385c1. get / get_mut / get_or_insert no longer tie the input &K reference's lifetime to &self. Now HistoryMapItemRef<'_> / Mut<'_> borrow only via &self / &mut self, so callers can drop the key reference before using the returned ref.

Comment on lines 14 to 24
/// The history linked list. Always has at least one item with the snapshot id of 0.
pub struct ElementWithHistory<V, A: Allocator + Clone, EP = ()> {
///
/// `key` is embedded so that the pending-updates list can store a stable pointer
/// to an `ElementWithHistory` and still surface the key on iteration without
/// going back through the BTreeMap.
pub struct ElementWithHistory<K, V, A: Allocator + Clone, EP = ()> {
/// Key owned by this element (separate from the BTreeMap key copy).
pub key: K,
/// Additional properties associated with the element globally.
/// These properties persist across rollbacks/commits and don't participate in snapshots
pub element_properties: EP,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — verified neither ElementWithHistory nor HistoryRecord is referenced outside the history_map module, so the pub mod exposure was unintentional. Fixed in 2d385c1: element_with_history is now pub(crate), eliminating the unintended public surface.

0xVolosnikov and others added 4 commits May 29, 2026 15:24
Stores ElementWithHistory in a fixed-page-size ListVec arena (mirroring
ElementPool for HistoryRecord). BTreeMap holds NonNull pointers into the
arena; pending-updates list stores those same pointers instead of cloned
keys. Bypasses BTreeMap descents on rollback/commit/iter-pending paths
and amortizes ElementWithHistory allocations over arena pages.

K is embedded inside ElementWithHistory so iterators/callbacks still
surface the key without a BTreeMap lookup.

Experimental — Option B sibling of vv/history-map-box (Box variant).
`cargo clippy --workspace -- -D warnings` flagged the
`btree.iter().map(|(_k, ptr)| ...)` pattern in HistoryMap::iter as
`clippy::iter_kv_map`. Replace with `btree.values().map(|ptr| ...)`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…abstraction

Three review-driven fixes to the arena-based HistoryMap:

* `ElementWithHistoryArena::allocate` previously did `Stack::push` followed
  by `Stack::top_mut`, each of which walks the backing `LinkedList` via
  `iter_mut().last()` (O(pages)). Add `ListVec::push_returning_ref` that
  uses `LinkedList::back_mut` (O(1)) once instead — turns per-insert work
  from O(pages) into O(1).

* `HistoryMap::clear` now drops the BTreeMap and the pending-updates list
  *before* releasing the arena pages, so the "every pointer stored in
  either container is valid" invariant holds at every observable point.
  Equivalent under the current `&mut self` borrow but defends against any
  future panic path opening up between the two drops.

* `ElementWithHistoryArena::clear` calls `Stack::clear` instead of reaching
  into `ListVec`'s tuple-struct field (`buffer.0.clear()`), avoiding a
  coupling to ListVec's internal representation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nsert lifetimes

Two more review-driven fixes:

* `element_with_history` module is now `pub(crate)` since `ElementWithHistory`
  and `HistoryRecord` have no external callers; this PR's addition of the
  `K` type parameter would otherwise be a public breaking-API change.

* `HistoryMap::{get, get_mut, get_or_insert}` no longer tie the input `key`
  reference's lifetime to `&self`. `HistoryMapItemRef`/`Mut` only need to
  borrow the arena element (now owned via `&self` / `&mut self`), so the
  signature relaxes to `key: &K`, letting callers drop the key borrow
  before using the returned ref.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@0xVolosnikov 0xVolosnikov force-pushed the vv/history-map-arena branch from 2d385c1 to 3042aa2 Compare May 29, 2026 20:25
@github-actions
Copy link
Copy Markdown
Contributor

Block-level effective cycles

Average across all block fixtures (process_block). Per-block breakdown below.

Benchmark Symbol Base Eff Head Eff (%) Base Raw Head Raw (%) Base Blake Head Blake (%) Base Bigint Head Bigint (%) Base Keccak Head Keccak (%)
all blocks (keccak DA) process_block 653,615,266 645,316,150 (-1.27%) 521,930,182 513,631,067 (-1.59%) 781,526 781,526 (+0.00%) 23,323,469 23,323,469 (+0.00%) 6,471,698 6,471,698 (+0.00%)
all blocks (blobs DA) process_block 701,866,111 693,568,071 (-1.18%) 559,084,359 550,786,319 (-1.48%) 791,605 791,605 (+0.00%) 26,365,011 26,365,011 (+0.00%) 6,164,007 6,164,007 (+0.00%)
Per-block effective cycles
Benchmark Symbol Base Eff Head Eff (%) Base Raw Head Raw (%) Base Blake Head Blake (%) Base Bigint Head Bigint (%) Base Keccak Head Keccak (%)
block_25188855 (keccak DA) process_block 237,657,747 233,875,161 (-1.59%) 184,564,543 180,781,957 (-2.05%) 498,230 498,230 (+0.00%) 8,457,231 8,457,231 (+0.00%) 2,823,150 2,823,150 (+0.00%)
block_25188855 (blobs DA) process_block 286,593,796 282,812,474 (-1.32%) 221,896,328 218,115,006 (-1.70%) 502,810 502,810 (+0.00%) 11,479,512 11,479,512 (+0.00%) 2,683,615 2,683,615 (+0.00%)
block_25188862 (keccak DA) process_block 549,525,194 540,097,808 (-1.72%) 421,362,246 411,934,860 (-2.24%) 831,340 831,340 (+0.00%) 22,892,549 22,892,549 (+0.00%) 5,822,828 5,822,828 (+0.00%)
block_25188862 (blobs DA) process_block 598,065,527 588,638,172 (-1.58%) 458,731,071 449,303,716 (-2.06%) 841,550 841,550 (+0.00%) 25,956,106 25,956,106 (+0.00%) 5,511,308 5,511,308 (+0.00%)
block_25188863 (keccak DA) process_block 229,913,146 225,593,211 (-1.88%) 177,029,506 172,709,571 (-2.44%) 419,790 419,790 (+0.00%) 8,150,725 8,150,725 (+0.00%) 3,391,025 3,391,025 (+0.00%)
block_25188863 (blobs DA) process_block 279,011,984 274,692,049 (-1.55%) 214,500,872 210,180,937 (-2.01%) 424,750 424,750 (+0.00%) 11,188,970 11,188,970 (+0.00%) 3,239,808 3,239,808 (+0.00%)
block_25188937 (keccak DA) process_block 720,636,582 705,874,358 (-2.05%) 566,510,310 551,748,086 (-2.61%) 1,209,910 1,209,910 (+0.00%) 21,884,022 21,884,022 (+0.00%) 11,807,906 11,807,906 (+0.00%)
block_25188937 (blobs DA) process_block 767,802,154 753,039,910 (-1.92%) 603,146,270 588,384,026 (-2.45%) 1,224,860 1,224,860 (+0.00%) 24,913,521 24,913,521 (+0.00%) 11,351,010 11,351,010 (+0.00%)
block_25188945 (keccak DA) process_block 421,930,894 411,382,114 (-2.50%) 341,291,474 330,742,694 (-3.09%) 930,920 930,920 (+0.00%) 11,233,142 11,233,142 (+0.00%) 5,203,033 5,203,033 (+0.00%)
block_25188945 (blobs DA) process_block 469,735,767 459,186,971 (-2.25%) 378,396,423 367,847,627 (-2.79%) 945,470 945,470 (+0.00%) 14,294,488 14,294,488 (+0.00%) 4,758,468 4,758,468 (+0.00%)
block_25188950 (keccak DA) process_block 538,248,623 532,892,355 (-1.00%) 433,143,227 427,786,959 (-1.24%) 659,000 659,000 (+0.00%) 19,210,924 19,210,924 (+0.00%) 4,429,425 4,429,425 (+0.00%)
block_25188950 (blobs DA) process_block 587,289,794 581,942,623 (-0.91%) 470,656,926 465,309,755 (-1.14%) 665,270 665,270 (+0.00%) 22,259,167 22,259,167 (+0.00%) 4,237,970 4,237,970 (+0.00%)
block_25189014 (keccak DA) process_block 379,907,714 374,600,012 (-1.40%) 296,127,822 290,820,120 (-1.79%) 577,680 577,680 (+0.00%) 13,434,465 13,434,465 (+0.00%) 5,199,788 5,199,788 (+0.00%)
block_25189014 (blobs DA) process_block 428,986,903 423,679,231 (-1.24%) 333,597,727 328,290,055 (-1.59%) 582,880 582,880 (+0.00%) 16,474,342 16,474,342 (+0.00%) 5,041,432 5,041,432 (+0.00%)
block_25189128 (keccak DA) process_block 426,196,711 416,337,830 (-2.31%) 342,425,715 332,566,834 (-2.88%) 773,970 773,970 (+0.00%) 11,463,305 11,463,305 (+0.00%) 6,383,564 6,383,564 (+0.00%)
block_25189128 (blobs DA) process_block 474,334,839 464,475,940 (-2.08%) 379,623,879 369,764,980 (-2.60%) 786,150 786,150 (+0.00%) 14,521,453 14,521,453 (+0.00%) 6,011,687 6,011,687 (+0.00%)
block_25189151 (keccak DA) process_block 732,173,781 719,707,924 (-1.70%) 556,213,169 543,747,312 (-2.24%) 1,085,470 1,085,470 (+0.00%) 29,031,931 29,031,931 (+0.00%) 10,616,342 10,616,342 (+0.00%)
block_25189151 (blobs DA) process_block 779,212,290 766,746,432 (-1.60%) 592,997,650 580,531,792 (-2.10%) 1,104,220 1,104,220 (+0.00%) 32,092,856 32,092,856 (+0.00%) 10,043,924 10,043,924 (+0.00%)
block_25189153 (keccak DA) process_block 2,299,962,265 2,292,800,732 (-0.31%) 1,900,633,813 1,893,472,280 (-0.38%) 828,950 828,950 (+0.00%) 87,476,392 87,476,392 (+0.00%) 9,039,921 9,039,921 (+0.00%)
block_25189153 (blobs DA) process_block 2,347,628,053 2,340,466,906 (-0.31%) 1,937,296,445 1,930,135,298 (-0.37%) 838,090 838,090 (+0.00%) 90,469,691 90,469,691 (+0.00%) 8,760,851 8,760,851 (+0.00%)
Block-level sub-phases
Benchmark Symbol Base Eff Head Eff (%) Base Raw Head Raw (%) Base Blake Head Blake (%) Base Bigint Head Bigint (%) Base Keccak Head Keccak (%)
block_25188855 (blobs DA) blob_versioned_hash 49,929,644 49,929,644 (+0.00%) 37,767,240 37,767,240 (+0.00%) 4,580 4,580 (+0.00%) 3,022,281 3,022,281 (+0.00%) 0 0 (+0.00%)
block_25188862 (blobs DA) blob_versioned_hash 50,786,889 50,786,889 (+0.00%) 38,369,301 38,369,301 (+0.00%) 10,210 10,210 (+0.00%) 3,063,557 3,063,557 (+0.00%) 0 0 (+0.00%)
block_25188863 (blobs DA) blob_versioned_hash 50,175,573 50,175,573 (+0.00%) 37,943,233 37,943,233 (+0.00%) 4,960 4,960 (+0.00%) 3,038,245 3,038,245 (+0.00%) 0 0 (+0.00%)
block_25188937 (blobs DA) blob_versioned_hash 50,405,427 50,405,427 (+0.00%) 38,048,231 38,048,231 (+0.00%) 14,950 14,950 (+0.00%) 3,029,499 3,029,499 (+0.00%) 0 0 (+0.00%)
block_25188945 (blobs DA) blob_versioned_hash 50,921,583 50,921,583 (+0.00%) 38,443,399 38,443,399 (+0.00%) 14,550 14,550 (+0.00%) 3,061,346 3,061,346 (+0.00%) 0 0 (+0.00%)
block_25188950 (blobs DA) blob_versioned_hash 50,411,534 50,411,534 (+0.00%) 38,118,242 38,118,242 (+0.00%) 6,270 6,270 (+0.00%) 3,048,243 3,048,243 (+0.00%) 0 0 (+0.00%)
block_25189014 (blobs DA) blob_versioned_hash 50,211,526 50,211,526 (+0.00%) 37,968,818 37,968,818 (+0.00%) 5,200 5,200 (+0.00%) 3,039,877 3,039,877 (+0.00%) 0 0 (+0.00%)
block_25189128 (blobs DA) blob_versioned_hash 50,778,496 50,778,496 (+0.00%) 38,351,024 38,351,024 (+0.00%) 12,180 12,180 (+0.00%) 3,058,148 3,058,148 (+0.00%) 0 0 (+0.00%)
block_25189151 (blobs DA) blob_versioned_hash 51,110,387 51,110,387 (+0.00%) 38,566,687 38,566,687 (+0.00%) 18,750 18,750 (+0.00%) 3,060,925 3,060,925 (+0.00%) 0 0 (+0.00%)
block_25189153 (blobs DA) blob_versioned_hash 49,654,213 49,654,213 (+0.00%) 37,534,777 37,534,777 (+0.00%) 9,140 9,140 (+0.00%) 2,993,299 2,993,299 (+0.00%) 0 0 (+0.00%)
block_25188855 (blobs DA) da_commitment 2,520,840 2,509,372 (-0.45%) 2,408,840 2,397,372 (-0.48%) 7,000 7,000 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188855 (keccak DA) da_commitment 3,513,442 3,501,974 (-0.33%) 2,845,898 2,834,430 (-0.40%) 7,000 7,000 (+0.00%) 0 0 (+0.00%) 138,886 138,886 (+0.00%)
block_25188862 (blobs DA) da_commitment 5,542,919 5,515,260 (-0.50%) 5,290,119 5,262,460 (-0.52%) 15,800 15,800 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188862 (keccak DA) da_commitment 7,785,080 7,757,421 (-0.36%) 6,288,796 6,261,137 (-0.44%) 15,800 15,800 (+0.00%) 0 0 (+0.00%) 310,871 310,871 (+0.00%)
block_25188863 (blobs DA) da_commitment 2,557,099 2,544,751 (-0.48%) 2,441,579 2,429,231 (-0.51%) 7,220 7,220 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188863 (keccak DA) da_commitment 3,629,435 3,617,087 (-0.34%) 2,911,643 2,899,295 (-0.42%) 7,220 7,220 (+0.00%) 0 0 (+0.00%) 150,568 150,568 (+0.00%)
block_25188937 (blobs DA) da_commitment 7,684,897 7,652,448 (-0.42%) 7,328,897 7,296,448 (-0.44%) 22,250 22,250 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188937 (keccak DA) da_commitment 10,920,391 10,887,942 (-0.30%) 8,739,403 8,706,954 (-0.37%) 22,250 22,250 (+0.00%) 0 0 (+0.00%) 456,247 456,247 (+0.00%)
block_25188945 (blobs DA) da_commitment 6,766,623 6,726,949 (-0.59%) 6,450,463 6,410,789 (-0.62%) 19,760 19,760 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188945 (keccak DA) da_commitment 9,878,984 9,839,310 (-0.40%) 7,787,160 7,747,486 (-0.51%) 19,760 19,760 (+0.00%) 0 0 (+0.00%) 443,916 443,916 (+0.00%)
block_25188950 (blobs DA) da_commitment 3,338,915 3,323,671 (-0.46%) 3,188,995 3,173,751 (-0.48%) 9,370 9,370 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188950 (keccak DA) da_commitment 4,700,642 4,685,398 (-0.32%) 3,787,498 3,772,254 (-0.40%) 9,370 9,370 (+0.00%) 0 0 (+0.00%) 190,806 190,806 (+0.00%)
block_25189014 (blobs DA) da_commitment 2,978,030 2,965,479 (-0.42%) 2,850,670 2,838,119 (-0.44%) 7,960 7,960 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189014 (keccak DA) da_commitment 4,106,010 4,093,459 (-0.31%) 3,347,822 3,335,271 (-0.37%) 7,960 7,960 (+0.00%) 0 0 (+0.00%) 157,707 157,707 (+0.00%)
block_25189128 (blobs DA) da_commitment 6,135,237 6,104,145 (-0.51%) 5,844,517 5,813,425 (-0.53%) 18,170 18,170 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189128 (keccak DA) da_commitment 8,771,258 8,740,166 (-0.35%) 6,995,626 6,964,534 (-0.44%) 18,170 18,170 (+0.00%) 0 0 (+0.00%) 371,228 371,228 (+0.00%)
block_25189151 (blobs DA) da_commitment 8,058,835 8,019,933 (-0.48%) 7,691,795 7,652,893 (-0.51%) 22,940 22,940 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189151 (keccak DA) da_commitment 12,126,349 12,087,447 (-0.32%) 9,472,233 9,433,331 (-0.41%) 22,940 22,940 (+0.00%) 0 0 (+0.00%) 571,769 571,769 (+0.00%)
block_25189153 (blobs DA) da_commitment 4,816,784 4,797,776 (-0.39%) 4,587,984 4,568,976 (-0.41%) 14,300 14,300 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189153 (keccak DA) da_commitment 6,800,863 6,781,855 (-0.28%) 5,458,379 5,439,371 (-0.35%) 14,300 14,300 (+0.00%) 0 0 (+0.00%) 278,421 278,421 (+0.00%)
block_25188855 (keccak DA) run_tx_loop 212,949,827 209,363,980 (-1.68%) 162,437,559 158,851,712 (-2.21%) 373,590 373,590 (+0.00%) 8,457,231 8,457,231 (+0.00%) 2,676,476 2,676,476 (+0.00%)
block_25188862 (keccak DA) run_tx_loop 500,660,710 491,630,493 (-1.80%) 377,720,718 368,690,501 (-2.39%) 584,570 584,570 (+0.00%) 22,892,549 22,892,549 (+0.00%) 5,504,169 5,504,169 (+0.00%)
block_25188863 (keccak DA) run_tx_loop 205,441,519 201,334,351 (-2.00%) 155,175,303 151,068,135 (-2.65%) 295,790 295,790 (+0.00%) 8,150,725 8,150,725 (+0.00%) 3,232,669 3,232,669 (+0.00%)
block_25188937 (keccak DA) run_tx_loop 646,275,755 632,097,785 (-2.19%) 499,927,863 485,749,893 (-2.84%) 839,770 839,770 (+0.00%) 21,884,022 21,884,022 (+0.00%) 11,343,871 11,343,871 (+0.00%)
block_25188945 (keccak DA) run_tx_loop 370,090,278 360,034,013 (-2.72%) 295,673,194 285,616,929 (-3.40%) 654,950 654,950 (+0.00%) 11,233,142 11,233,142 (+0.00%) 4,751,329 4,751,329 (+0.00%)
block_25188950 (keccak DA) run_tx_loop 505,472,781 500,385,510 (-1.01%) 403,796,161 398,708,890 (-1.26%) 494,350 494,350 (+0.00%) 19,210,924 19,210,924 (+0.00%) 4,230,831 4,230,831 (+0.00%)
block_25189014 (keccak DA) run_tx_loop 348,919,029 343,850,601 (-1.45%) 268,259,997 263,191,569 (-1.89%) 424,000 424,000 (+0.00%) 13,434,465 13,434,465 (+0.00%) 5,034,293 5,034,293 (+0.00%)
block_25189128 (keccak DA) run_tx_loop 374,412,182 365,014,229 (-2.51%) 296,517,090 287,119,137 (-3.17%) 501,480 501,480 (+0.00%) 11,463,305 11,463,305 (+0.00%) 6,004,548 6,004,548 (+0.00%)
block_25189151 (keccak DA) run_tx_loop 664,400,608 652,499,869 (-1.79%) 496,277,104 484,376,365 (-2.40%) 740,540 740,540 (+0.00%) 29,031,931 29,031,931 (+0.00%) 10,036,785 10,036,785 (+0.00%)
block_25189153 (keccak DA) run_tx_loop 2,252,330,275 2,245,524,659 (-0.30%) 1,857,998,019 1,851,192,403 (-0.37%) 588,240 588,240 (+0.00%) 87,476,392 87,476,392 (+0.00%) 8,753,712 8,753,712 (+0.00%)
block_25188855 (blobs DA) state_commitment_update 17,558,979 17,422,404 (-0.78%) 16,023,619 15,887,044 (-0.85%) 95,960 95,960 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188855 (keccak DA) state_commitment_update 17,555,562 17,417,695 (-0.79%) 16,020,202 15,882,335 (-0.86%) 95,960 95,960 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188862 (blobs DA) state_commitment_update 32,412,499 32,162,614 (-0.77%) 29,506,419 29,256,534 (-0.85%) 181,630 181,630 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188862 (keccak DA) state_commitment_update 32,412,499 32,162,614 (-0.77%) 29,506,419 29,256,534 (-0.85%) 181,630 181,630 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188863 (blobs DA) state_commitment_update 16,942,399 16,810,275 (-0.78%) 15,443,519 15,311,395 (-0.86%) 93,680 93,680 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188863 (keccak DA) state_commitment_update 16,942,399 16,810,275 (-0.78%) 15,443,519 15,311,395 (-0.86%) 93,680 93,680 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188937 (blobs DA) state_commitment_update 53,739,347 53,328,132 (-0.77%) 49,136,947 48,725,732 (-0.84%) 287,650 287,650 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188937 (keccak DA) state_commitment_update 53,739,347 53,328,132 (-0.77%) 49,136,947 48,725,732 (-0.84%) 287,650 287,650 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188945 (blobs DA) state_commitment_update 31,127,413 30,853,196 (-0.88%) 28,100,053 27,825,836 (-0.98%) 189,210 189,210 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188945 (keccak DA) state_commitment_update 31,127,413 30,853,196 (-0.88%) 28,100,053 27,825,836 (-0.98%) 189,210 189,210 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188950 (blobs DA) state_commitment_update 23,369,260 23,191,203 (-0.76%) 21,334,060 21,156,003 (-0.83%) 127,200 127,200 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188950 (keccak DA) state_commitment_update 23,373,478 23,186,485 (-0.80%) 21,338,278 21,151,285 (-0.88%) 127,200 127,200 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189014 (blobs DA) state_commitment_update 23,000,664 22,820,261 (-0.78%) 21,036,504 20,856,101 (-0.86%) 122,760 122,760 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189014 (keccak DA) state_commitment_update 23,000,666 22,820,192 (-0.78%) 21,036,506 20,856,032 (-0.86%) 122,760 122,760 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189128 (blobs DA) state_commitment_update 34,326,398 34,042,216 (-0.83%) 31,148,158 30,863,976 (-0.91%) 198,640 198,640 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189128 (keccak DA) state_commitment_update 34,326,398 34,042,216 (-0.83%) 31,148,158 30,863,976 (-0.91%) 198,640 198,640 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189151 (blobs DA) state_commitment_update 44,869,541 44,510,769 (-0.80%) 40,801,861 40,443,089 (-0.88%) 254,230 254,230 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189151 (keccak DA) state_commitment_update 44,869,541 44,510,769 (-0.80%) 40,801,861 40,443,089 (-0.88%) 254,230 254,230 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189153 (blobs DA) state_commitment_update 34,928,995 34,659,471 (-0.77%) 31,910,595 31,641,071 (-0.84%) 188,650 188,650 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189153 (keccak DA) state_commitment_update 34,928,995 34,659,387 (-0.77%) 31,910,595 31,640,987 (-0.84%) 188,650 188,650 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188855 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188862 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188863 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188937 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188945 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25188950 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189014 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189128 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189151 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
block_25189153 (keccak DA) system_init 48,086 48,207 (+0.25%) 48,086 48,207 (+0.25%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
Precompiles test-crate bench (synthetic workload, all labels)
Benchmark Symbol Base Eff Head Eff (%) Base Raw Head Raw (%) Base Blake Head Blake (%) Base Bigint Head Bigint (%) Base Keccak Head Keccak (%)
precompiles bn254_ecadd 53,340 53,340 (+0.00%) 47,888 47,888 (+0.00%) 0 0 (+0.00%) 1,363 1,363 (+0.00%) 0 0 (+0.00%)
precompiles bn254_ecmul 732,100 732,100 (+0.00%) 567,912 567,912 (+0.00%) 0 0 (+0.00%) 41,047 41,047 (+0.00%) 0 0 (+0.00%)
precompiles bn254_pairing 71,722,248 71,722,248 (+0.00%) 57,194,104 57,194,104 (+0.00%) 0 0 (+0.00%) 3,632,036 3,632,036 (+0.00%) 0 0 (+0.00%)
precompiles da_commitment 16,711 16,645 (-0.39%) 13,635 13,569 (-0.48%) 30 30 (+0.00%) 0 0 (+0.00%) 649 649 (+0.00%)
precompiles ecrecover 370,405 368,880 (-0.41%) 241,693 240,988 (-0.29%) 0 0 (+0.00%) 31,529 31,324 (-0.65%) 649 649 (+0.00%)
precompiles id 925 925 (+0.00%) 925 925 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
precompiles keccak 31,678 31,677 (-0.00%) 10,906 10,905 (-0.01%) 0 0 (+0.00%) 1 1 (+0.00%) 5,192 5,192 (+0.00%)
precompiles modexp 31,947,552 31,947,514 (-0.00%) 21,289,732 21,289,694 (-0.00%) 0 0 (+0.00%) 2,664,455 2,664,455 (+0.00%) 0 0 (+0.00%)
precompiles p256_verify 747,503 747,503 (+0.00%) 468,811 468,811 (+0.00%) 0 0 (+0.00%) 69,673 69,673 (+0.00%) 0 0 (+0.00%)
precompiles process_block 145,053,670 145,056,865 (+0.00%) 115,456,318 115,443,565 (-0.01%) 5,350 5,340 (-0.19%) 7,326,018 7,330,045 (+0.05%) 51,920 51,920 (+0.00%)
precompiles process_transaction 72,308,711 72,316,245 (+0.01%) 57,565,807 57,563,913 (-0.00%) 160 160 (+0.00%) 3,663,020 3,665,377 (+0.06%) 22,066 22,066 (+0.00%)
precompiles ripemd 8,015 8,015 (+0.00%) 8,015 8,015 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
precompiles run_tx_loop 144,575,771 144,580,005 (+0.00%) 115,094,887 115,083,013 (-0.01%) 180 180 (+0.00%) 7,326,018 7,330,045 (+0.05%) 43,483 43,483 (+0.00%)
precompiles sha256 13,319 13,319 (+0.00%) 13,319 13,319 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
precompiles state_commitment_update 183,227 182,617 (-0.33%) 143,547 142,937 (-0.42%) 2,480 2,480 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
precompiles system_init 49,856 49,977 (+0.24%) 49,856 49,977 (+0.24%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
FRI precompile bench (FriProofTx + sidecar + contract call)
Benchmark Symbol Base Eff Head Eff (%) Base Raw Head Raw (%) Base Blake Head Blake (%) Base Bigint Head Bigint (%) Base Keccak Head Keccak (%)
fri_precompile da_commitment 11,354 11,292 (-0.55%) 11,034 10,972 (-0.56%) 20 20 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)
fri_precompile ecrecover 367,405 366,504 (-0.25%) 239,737 239,352 (-0.16%) 0 0 (+0.00%) 31,268 31,139 (-0.41%) 649 649 (+0.00%)
fri_precompile keccak 4,700 4,699 (-0.02%) 2,100 2,099 (-0.05%) 0 0 (+0.00%) 1 1 (+0.00%) 649 649 (+0.00%)
fri_precompile process_block 17,014,448 17,010,112 (-0.03%) 11,165,588 11,162,092 (-0.03%) 354,210 354,210 (+0.00%) 31,746 31,536 (-0.66%) 13,629 13,629 (+0.00%)
fri_precompile process_transaction 16,539,094 16,535,196 (-0.02%) 10,804,782 10,801,724 (-0.03%) 349,160 349,160 (+0.00%) 31,746 31,536 (-0.66%) 5,192 5,192 (+0.00%)
fri_precompile run_tx_loop 16,548,856 16,544,331 (-0.03%) 10,811,948 10,808,263 (-0.03%) 349,160 349,160 (+0.00%) 31,746 31,536 (-0.66%) 5,841 5,841 (+0.00%)
fri_precompile state_commitment_update 164,338 162,566 (-1.08%) 127,058 124,966 (-1.65%) 2,330 2,350 (+0.86%) 0 0 (+0.00%) 0 0 (+0.00%)
fri_precompile system_init 50,176 50,297 (+0.24%) 50,176 50,297 (+0.24%) 0 0 (+0.00%) 0 0 (+0.00%) 0 0 (+0.00%)

Per-opcode

Per-opcode cycle diff

Opcode Count Med Cycles eff (%) Total Cycles eff (%) Med Cyc/Gas eff (%) Worst Cyc/Gas eff (%)
SHA3 49125 4,731 (+0.1%) 247,508,490 (+0.1%) 112.6 (+0.1%) 150.9 (+0.0%)
MSTORE 419062 200 (+1.0%) 101,483,772 (+0.8%) 66.7 (+1.0%) 66.7 (+1.0%)
SLOAD 64715 1,254 (-0.5%) 100,595,142 (-2.5%) 8.4 (+0.1%) 22.9 (+0.0%)
MLOAD 396315 181 (+2.3%) 71,791,689 (+2.3%) 60.3 (+2.3%) 60.3 (+2.3%)
JUMPI 743606 109 (+0.9%) 66,582,332 (+0.6%) 10.9 (+0.9%) 10.9 (+0.9%)
SSTORE 17258 2,378 (-1.4%) 42,033,920 (-2.3%) 0.8 (-1.0%) 39.2 (-4.3%)
CALLDATALOAD 115629 236 (-2.1%) 28,925,813 (-2.0%) 78.7 (-2.1%) 103.3 (-1.6%)
PUSH32 70114 298 (+1.0%) 20,034,664 (+1.1%) 99.3 (+1.0%) 102.0 (+1.0%)
CODECOPY 51097 297 (+2.1%) 15,260,778 (+2.1%) 49.5 (+2.1%) 49.7 (+2.1%)
DIV 50773 288 (+2.5%) 14,583,153 (+2.5%) 57.6 (+2.5%) 57.6 (+2.5%)
SHL 103511 133 (+0.8%) 13,413,108 (+0.8%) 44.3 (+0.8%) 56.0 (+0.6%)
MULMOD 18105 471 (+0.2%) 8,556,297 (+0.2%) 58.9 (+0.2%) 61.2 (+0.2%)
SHR 64574 109 (+0.9%) 7,856,952 (+0.8%) 36.3 (+0.9%) 55.7 (+0.6%)
LOG3 6938 1,066 (+2.0%) 7,509,195 (+1.6%) 0.6 (+1.3%) 0.8 (+2.4%)
CALLDATACOPY 11796 361 (+2.3%) 7,277,599 (+1.2%) 20.8 (+2.2%) 49.5 (+2.1%)
ADDMOD 14942 384 (+0.8%) 5,762,583 (+0.8%) 48.0 (+0.8%) 100.4 (+0.4%)
EXTCODESIZE 2673 474 (-0.2%) 5,085,480 (-2.4%) 3.7 (+0.3%) 7.8
EXP 10441 576 (+0.2%) 4,724,580 (+0.2%) 9.6 (+0.2%) 14.5 (+0.7%)
SIGNEXTEND 14103 268 (+1.5%) 3,778,190 (+1.5%) 53.6 (+1.5%) 55.2 (+1.5%)
TSTORE 2650 803 (-15.8%) 2,319,925 (-13.0%) 8.0 (-15.8%) 28.2 (-2.8%)
TLOAD 3110 580 (+0.5%) 2,090,283 (+7.3%) 5.8 (+0.5%) 23.0 (-2.2%)
PUSH29 6639 308 (+1.0%) 2,034,186 (+1.0%) 102.7 (+1.0%) 102.7 (+1.0%)
RETURNDATACOPY 5789 250 (+2.9%) 1,499,266 (+2.6%) 41.7 (+2.9%) 54.0 (+2.2%)
SDIV 4229 324 (+1.9%) 1,409,156 (+1.8%) 64.8 (+1.9%) 120.8 (+0.8%)
RETURN 12483 92 1,128,571 (-0.1%) n/a n/a
LOG4 570 1,225 (+0.7%) 695,933 (+1.1%) 0.5 (-0.5%) 0.7 (-2.0%)
MOD 2798 240 (+0.4%) 671,520 (+0.4%) 48.0 (+0.4%) 48.0 (+0.4%)
LOG1 709 855 (-0.7%) 632,322 (+1.0%) 0.6 (+0.9%) 1.1 (+2.0%)
MCOPY 1437 308 (+1.7%) 606,227 (+0.8%) 30.0 46.8 (+1.8%)
PUSH28 2131 277 (+3.4%) 587,637 (+3.4%) 92.3 (+3.4%) 98.3 (+3.1%)
LOG2 551 953 (+1.6%) 546,072 (+1.6%) 0.6 (+1.5%) 0.9 (-1.4%)
PUSH21 1804 262 (+1.2%) 467,070 (+1.2%) 87.3 (+1.2%) 90.0 (+1.1%)
SAR 2385 182 (+1.1%) 436,715 (+0.8%) 60.7 (+1.1%) 95.7 (+0.3%)
CREATE2 14 7,134 (-0.1%) 337,371 (-0.0%) n/a n/a
PUSH31 1237 252 (+1.2%) 333,934 (+1.1%) 84.0 (+1.2%) 105.3 (+1.0%)
MSTORE8 3116 99 (+11.2%) 308,484 (+11.2%) 33.0 (+11.2%) 33.0 (+11.2%)
SELFBALANCE 564 367 (+6.4%) 210,223 (+6.0%) 73.4 (+6.4%) 136.6 (+4.4%)
SMOD 544 300 (+1.0%) 167,863 (+1.0%) 60.0 (+1.0%) 65.0 (+0.9%)
TIMESTAMP 2474 63 (-1.6%) 155,862 (-1.6%) 31.5 (-1.6%) 31.5 (-1.6%)
PUSH26 304 277 (+1.1%) 81,886 (+1.1%) 92.3 (+1.1%) 98.3 (+1.0%)
EXTCODEHASH 43 549 71,573 (-1.9%) 4.7 (+0.2%) 6.8 (+0.3%)
EXTCODECOPY 20 1,449 (+1.0%) 70,733 (-0.7%) 8.9 (+1.3%) 41.7 (+1.3%)
BALANCE 132 377 (-0.3%) 57,774 (-0.8%) 3.8 (-0.3%) 5.7
PUSH30 75 302 (+3.1%) 22,278 (+3.1%) 100.7 (+3.1%) 106.7 (+2.9%)
LOG0 26 718 (-0.7%) 18,977 (-1.2%) 0.9 (+0.4%) 1.2 (+1.1%)
PUSH25 71 275 (+1.1%) 18,501 (+1.2%) 91.7 (+1.1%) 94.3 (+1.1%)
REVERT 215 92 18,461 (-0.6%) 67.0 67.0
PUSH27 38 283 (+1.1%) 10,300 (+1.1%) 94.3 (+1.1%) 100.3 (+1.0%)
CREATE 2 3,354 (+0.0%) 6,709 (+0.0%) n/a n/a
COINBASE 80 70 (-1.4%) 5,600 (-1.4%) 35.0 (-1.4%) 35.0 (-1.4%)
SELFDESTRUCT 2 2,483 (-2.2%) 4,967 (-2.2%) 0.5 (-2.2%) 0.5 (-2.4%)
BASEFEE 61 75 (-1.3%) 4,575 (-1.3%) 37.5 (-1.3%) 37.5 (-1.3%)
BLOCKHASH 14 214 (+1.4%) 2,996 (+1.4%) 10.7 (+1.4%) 10.7 (+1.4%)
BLOBHASH 11 184 (+4.5%) 1,806 (+4.2%) 61.3 (+4.5%) 61.3 (+4.5%)
DIFFICULTY 22 75 (-1.3%) 1,650 (-1.3%) 37.5 (-1.3%) 37.5 (-1.3%)
BLOBBASEFEE 2 75 (-2.6%) 150 (-2.6%) 37.5 (-2.6%) 37.5 (-2.6%)

Per-precompile

Per-precompile per-execution ratios (head)
cycles = effective (raw + Blake×16 + BigInt×4 + Keccak×4)
precompile                count    med c/g    p95 c/g    p99 c/g    max c/g    med n/g    p95 n/g    p99 n/g    max n/g
------------------------------------------------------------------------------------------------------------------------
keccak                    42872      111.9      126.8      209.3     4296.0      478.8      478.8      626.8      681.4
modexp                     2501       63.3       63.5      187.0     2877.2      500.0      500.0      500.0     4814.0
point_eval                   11     1023.6     1029.1     1029.1     1029.1     1262.1     1262.1     1262.1     1262.1
bls12_g1add                  12      895.0      896.6      896.6      896.6        0.0        0.0        0.0        0.0
blake2f                       2      803.7      803.7      803.7      803.7        0.0        0.0        0.0        0.0
bls12_pairing_check           4      217.7      427.5      427.5      427.5        0.0        0.0        0.0        0.0
ecadd                       617      352.1      360.8      364.2      368.1      350.7      350.7      350.7      350.7
bls12_g1msm                  12      157.9      318.7      318.7      318.7        0.0        0.0        0.0        0.0
ecpairing                    40      169.1      186.3      186.3      186.3      398.2      428.6      428.6      428.6
sha256                       28       96.4      143.6      143.6      143.6      104.2      148.9      148.9      148.9
ecmul                       597      120.9      125.3      126.5      128.6      127.3      127.3      127.3      127.3
ecrecover                   713      119.7      121.9      123.2      123.6      174.0      174.0      174.0      174.0
p256_verify                  22      107.7      108.3      108.4      108.4      113.6      113.6      113.6      113.6
bls12_g2msm                   2       88.4       88.4       88.4       88.4        0.0        0.0        0.0        0.0
identity                    292       29.2       41.7       44.4       50.8       40.8       59.0       62.8       72.2
bls12_g2add                   2       46.0       46.0       46.0       46.0        0.0        0.0        0.0        0.0
ripemd160                     4        4.4        7.4        7.4        7.4        8.1       13.1       13.1       13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants