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

bench: Poseidon2 with user supplied number of bytes #1649

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

codeblooded1729
Copy link
Contributor

@codeblooded1729 codeblooded1729 commented Apr 30, 2024

Main objective of the PR is to get an estimate of how expensive flat hashing of tapes would be through guest program.
to this end, we generate a vector of size input_len (deterministic, since we don't want the rng to interfere in benchmark), and use poseidon2 ecall to hash it. To find the relative time taken by the hashing part, we bench it against same code, preserving the generation of vector and loading it into memory, with hashing part excluded. The results are given below.
image

Few trace sizes of poseidon2 table, for different input_len are given below. (Note that trace_len = (input_len/RATE).next_power_of_two() indeed holds, as a sanity check)

input_len trace_len
1000 128
10000 2048
100000 16384

@codeblooded1729 codeblooded1729 force-pushed the kapil/bench_poseidon2 branch from 10c5d72 to 073fb68 Compare May 6, 2024 13:28
@matthiasgoergens
Copy link
Collaborator

What's the status of this one? @codeblooded1729

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.

2 participants