Skip to content

Remove type construction from tree_hash benchmarks#93

Merged
michaelsproul merged 1 commit intosigp:mainfrom
macladson:remove-setup-from-bench
Mar 19, 2026
Merged

Remove type construction from tree_hash benchmarks#93
michaelsproul merged 1 commit intosigp:mainfrom
macladson:remove-setup-from-bench

Conversation

@macladson
Copy link
Copy Markdown
Member

Issue

While doing some optimization experiments I noticed that we actually measure the type construction and the hashing in the same benchmarks which dilutes the apparent effect of any hashing optimizations.

Proposed Changes

Prevent the type construction from being timed by adding it into a "setup" closure which does not get benchmarked.
Doing it this way provides a "fresh" list every iteration so we avoid cache hits.

If we actually want to include benchmarks for construction we should make new benchmarks which specifically target that.

I also bumped criterion to 0.8

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.15%. Comparing base (4d88c72) to head (6e9cc61).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #93   +/-   ##
=======================================
  Coverage   70.15%   70.15%           
=======================================
  Files          22       22           
  Lines        1280     1280           
=======================================
  Hits          898      898           
  Misses        382      382           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

nice improvement!

@michaelsproul michaelsproul merged commit 3fcb03c into sigp:main Mar 19, 2026
6 checks passed
@macladson macladson deleted the remove-setup-from-bench branch March 19, 2026 22:59
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.

3 participants