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

starky performance #3

Open
srinathsetty opened this issue Mar 9, 2023 · 2 comments
Open

starky performance #3

srinathsetty opened this issue Mar 9, 2023 · 2 comments

Comments

@srinathsetty
Copy link

The following script seems to be benchmarking sha256 compression rather than a full SHA computation (which requires additional padding such as lengths): https://github.com/celer-network/plonky2-bench/blob/62ebc6ab5c690f7bcd65ffda756e220dfb0b996d/run_starky.sh

Shouldn't it be at least 1024 hashes to hash 64 KB, rather than 512?

@patrickmao93
Copy link
Contributor

patrickmao93 commented Mar 22, 2023

The following script seems to be benchmarking sha256 compression rather than a full SHA computation (which requires additional padding such as lengths): https://github.com/celer-network/plonky2-bench/blob/62ebc6ab5c690f7bcd65ffda756e220dfb0b996d/run_starky.sh

Shouldn't it be at least 1024 hashes to hash 64 KB, rather than 512?

You are absolutely right. The original code was written by Sebastian LeDusa from polygon. I asked him the same question and he had no plan on adding paddings for another benchmark. The thing is padding is not particularly expensive and wouldn't change the benchmark result by orders of magnitude. In our blog, we plot the graphs using the # of blocks hashed by Starky matching others. So the actual padding is the only part missing. Considering Starky's performance is way ahead of others, my bet is that with the padding part added it would still be at the top.

@Sladuca
Copy link

Sladuca commented Aug 14, 2023

It should be 1024 invocations for 64K, yes. Each compression function invocation consumes one 512-bit / 64 byte block.

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

No branches or pull requests

3 participants