Skip to content

feat: add benchmark - #6

Merged
twoeths merged 13 commits into
mainfrom
te/benchmark
May 5, 2025
Merged

feat: add benchmark#6
twoeths merged 13 commits into
mainfrom
te/benchmark

Conversation

@twoeths

@twoeths twoeths commented May 5, 2025

Copy link
Copy Markdown
Member

@github-actions

github-actions Bot commented May 5, 2025

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: beb905f Previous: null Ratio
JS - unshuffleList - 16384 indices 1.7613 ms/op
Zig - unshuffleList - 16384 indices 847.72 us/op
JS - unshuffleList - 250000 indices 21.440 ms/op
Zig - unshuffleList - 250000 indices 10.303 ms/op
JS - unshuffleList - 1000000 indices 95.009 ms/op
Zig - unshuffleList - 1000000 indices 35.458 ms/op
get values - 1000 621.00 ns/op
get values - naive - 1000 875.00 ns/op
set values - 1000 708.00 ns/op
set values - naive - 1000 824.00 ns/op
get values - 1000000 1.2160 us/op
get values - naive - 1000000 2.3050 us/op
set values - 1000000 1.4520 us/op
set values - naive - 1000000 3.2180 us/op
JS - computeSyncCommitteeIndices - 16384 indices 556.95 ms/op
Zig - computeSyncCommitteeIndices - 16384 indices 4.8716 ms/op
JS - computeSyncCommitteeIndices - 250000 indices 554.41 ms/op
Zig - computeSyncCommitteeIndices - 250000 indices 23.389 ms/op
JS - computeSyncCommitteeIndices - 1000000 indices 642.67 ms/op
Zig - computeSyncCommitteeIndices - 1000000 indices 42.785 ms/op

by benchmarkbot/action

@twoeths
twoeths marked this pull request as ready for review May 5, 2025 11:05
@twoeths

twoeths commented May 5, 2025

Copy link
Copy Markdown
Member Author

there is performance issue which should be fixed in other PRs

this branch:

test/perf/committeeIndices.test.ts
  computeIndices
    ✔ JS   - computeSyncCommitteeIndices - 1000000 indices                8.168061 ops/s    122.4281 ms/op        -         10 runs   1.73 s
    ✔ Zig   - computeSyncCommitteeIndices - 1000000 indices               75.22621 ops/s    13.29324 ms/op        -         25 runs  0.835 s


  2 passing
  0 failed
  0 pending

@chainsafe/swap-or-not-shuffle

test/perf/committeeIndices.test.ts
  computeIndices
    ✔ JS   - computeSyncCommitteeIndices - 1000000 indices                6.610211 ops/s    151.2811 ms/op   x1.007         10 runs   2.12 s
    ✔ RS   - computeSyncCommitteeIndices - 1000000 indices                159.2753 ops/s    6.278436 ms/op   x1.021         34 runs  0.719 s


  2 passing
  0 failed
  0 pending

@twoeths
twoeths merged commit f457961 into main May 5, 2025
@twoeths twoeths mentioned this pull request May 5, 2025
wemeetagain pushed a commit that referenced this pull request Nov 12, 2025
wemeetagain pushed a commit that referenced this pull request Mar 12, 2026
lodekeeper-z added a commit to lodekeeper-z/lodestar-z that referenced this pull request Mar 28, 2026
Medium issue ChainSafe#6 from REVIEW.md: submitBlindedBlock response dropped
transactions (the whole point of unblinding). Also dropped withdrawals
and extra_data as arena-owned strings.

Now parseExecutionPayload:
- Decodes each transaction from 0x-prefixed hex into owned bytes
- Decodes withdrawals array (index, validatorIndex, address, amount)
- Deep-copies extra_data from JSON arena into caller-owned memory

All 130 execution tests pass.

🤖 Generated with AI assistance
lodekeeper-z added a commit to lodekeeper-z/lodestar-z that referenced this pull request Mar 28, 2026
- attestation_service: use signing_ctx.slots_per_epoch instead of
  hardcoded /32 in reorg handler (fix #1)
- sync_committee_service: add TODO comments noting SYNC_COMMITTEE_SIZE=512
  and SUBNET_COUNT=4 are mainnet-only; minimal preset differs (fix #2)
- validator: add TODO comment on hardcoded 256 EPOCHS_PER_SYNC_COMMITTEE_PERIOD (fix ChainSafe#3)
- attestation_service: rename getDutiesAtSlot(slot) -> allDuties() since
  the slot param was unused; update call site (fix ChainSafe#4)
- signing: add current_epoch param to voluntaryExitSigningRoot() instead
  of calling std.time.timestamp() internally; keeps function pure/testable (fix ChainSafe#5)
- validator: replace inline @import("doppelganger.zig") with dopple_mod
  alias already imported at top of file (fix ChainSafe#6)
- validator_store: change isRemote from *const to *ValidatorStore since
  it calls mutex.lock() which requires mutability (fix ChainSafe#7)

🤖 Generated with AI assistance
@wemeetagain
wemeetagain deleted the te/benchmark branch August 17, 2026 19:47
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.

1 participant