Skip to content

Comments

Cached hash calculation for paddings#25

Open
noel2004 wants to merge 6 commits intomainfrom
cached_padding_hash
Open

Cached hash calculation for paddings#25
noel2004 wants to merge 6 commits intomainfrom
cached_padding_hash

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 lispc and naure 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