Skip to content

Use black_box on function arguments instead of result in Pedersen benchmark #1010

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

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

Conversation

GarmashAlex
Copy link

This commit updates the Pedersen hash benchmark to apply black_box to the input arguments (x and y) of the PedersenStarkCurve::hash function, rather than to its result. This change aligns with Criterion best practices, ensuring that the compiler does not optimize away the input values and that the benchmark more accurately measures the true performance of the hash function. No other logic was changed.

@GarmashAlex GarmashAlex requested a review from a team as a code owner July 16, 2025 14:34
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