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

Cached hash calculation for paddings #25

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

noel2004
Copy link
Member

This PR cached results for pow_5 and mds multiple while calculating the hash entry (0, 0). This entry is used for padding and would be heavily used. By caching the result, we could save some cost in synthesis, in which the witness generation process involves hash calculation.

The benchmark for a 99.8% (499/500) padding calculation show improvment from 174 -> 160ms in MockProver::run calling. We use cargo bench --features short --no-default-features for the benchmark without caching of results.

@noel2004 noel2004 requested review from naure and lispc June 12, 2023 02:31
@lispc
Copy link
Contributor

lispc commented May 17, 2024

@lightsing

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