Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add hash_tree_root() bench #168

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

estensen
Copy link

First PR in a series to improve the performance of hash_tree_root()

This work will eventually supersede #161 (aligned with the author)

Here I add scaffolding for a Criterion benchmark.

Next I'll add better benchmark data. I'm considering either gettings txs from a random block or randomly generating tx data. Leaning towards random sampling. WDYT?

cargo bench
...
test result: ok. 0 passed; 0 failed; 94 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running benches/merkleization.rs (target/release/deps/merkleization-a419062d8ee9f395)
Benchmarking hash_tree_root: Collecting 100 samples in estimated 5.2192 s (116k iterations
hash_tree_root          time:   [44.761 µs 44.939 µs 45.163 µs]
                        change: [-3.7546% +0.0491% +3.8651%] (p = 0.98 > 0.05)
                        No change in performance detected.
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) high mild
  6 (6.00%) high severe

@estensen estensen marked this pull request as draft December 7, 2024 16:36
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