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: poseidon and pedersen extended benchmarks #57

Merged
merged 6 commits into from
Apr 11, 2024

Conversation

maciejka
Copy link
Collaborator

@maciejka maciejka commented Apr 9, 2024

Add benchmarks for poseidon and pedersen hashes for both hash and hash_array functions.
There are three benchmarks for each hash function:

  • *_hash_single_input - same random pair of inputs is used for each hash function timing
  • *_hash_multiple_inputs - different random pair of inputs is used for each hash function timing, probably gives more realistic measurements
  • *_hash_array - for input lengths: 2, 4, 8, 16, different values are used for each hash_many timing

@maciejka maciejka marked this pull request as ready for review April 9, 2024 22:09
Copy link
Collaborator

@0xLucqs 0xLucqs left a comment

Choose a reason for hiding this comment

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

comments hold both for poseidon and pedersen. Also can you change the Makefile so we can run the benchmark using it?

crates/starknet-types-core/benches/criterion_hashes.rs Outdated Show resolved Hide resolved
crates/starknet-types-core/benches/criterion_hashes.rs Outdated Show resolved Hide resolved
crates/starknet-types-core/benches/criterion_hashes.rs Outdated Show resolved Hide resolved
crates/starknet-types-core/benches/criterion_hashes.rs Outdated Show resolved Hide resolved
@maciejka maciejka requested a review from 0xLucqs April 10, 2024 12:04
@maciejka maciejka requested a review from juanbono April 10, 2024 16:30
@maciejka maciejka merged commit 3921cb9 into starknet-io:main Apr 11, 2024
2 checks passed
@maciejka maciejka deleted the hashes-benchmarks branch April 11, 2024 13:30
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