Skip to content

bench: add HashBuilder benchmarks#125

Open
zerosnacks wants to merge 1 commit into
mainfrom
zerosnacks/benchmarks
Open

bench: add HashBuilder benchmarks#125
zerosnacks wants to merge 1 commit into
mainfrom
zerosnacks/benchmarks

Conversation

@zerosnacks
Copy link
Copy Markdown
Member

Summary

Adds benchmarks for HashBuilder to enable performance tracking and comparison for future optimizations.

Benchmarks Added

  • hash_builder: Measures root computation time for tries with 100, 1000, and 10000 leaves
  • hash_builder_updates: Same as above but with with_updates(true) to measure the overhead of tracking branch node updates

Usage

cargo bench

This provides a baseline for measuring performance improvements in upcoming optimization work.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jan 25, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
🆕 6 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 leaves[10000] N/A 42.9 ms N/A
🆕 leaves[1000] N/A 4.3 ms N/A
🆕 leaves[1000] N/A 4.4 ms N/A
🆕 leaves[10000] N/A 43.9 ms N/A
🆕 leaves[100] N/A 431.4 µs N/A
🆕 leaves[100] N/A 445.1 µs N/A

Comparing zerosnacks/benchmarks (1d26355) with main (fa56822)

Open in CodSpeed

@zerosnacks zerosnacks marked this pull request as ready for review January 25, 2026 18:31
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