Skip to content
This repository was archived by the owner on Oct 25, 2025. It is now read-only.

bench: Poseidon2 with user supplied number of bytes#1649

Draft
codeblooded1729 wants to merge 9 commits intomainfrom
kapil/bench_poseidon2
Draft

bench: Poseidon2 with user supplied number of bytes#1649
codeblooded1729 wants to merge 9 commits intomainfrom
kapil/bench_poseidon2

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
Contributor

What's the status of this one? @codeblooded1729

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants