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

[perf] VerifyBatch direct hint #1328

Merged
merged 7 commits into from
Feb 4, 2025
Merged

[perf] VerifyBatch direct hint #1328

merged 7 commits into from
Feb 4, 2025

Conversation

nyunyunyunyu
Copy link
Contributor

@nyunyunyunyu nyunyunyunyu commented Jan 31, 2025

VerifyBatch chip hints merkle proofs directly instead reads from memory. This saves some cells for hinting and some columns of memory operations. This is valid because all merkle proofs are just read once.

Comparison on c7a.48xlarge: reth bench
Comparison on c8g.48xlarge: reth bench
Ecrecover leaf flamegraph before
Ecrecover leaf flamegraph after

Metric: used cells in Ecrecover leaf flamegraph
Before: 158,652,038
This PR: 142,929,350
Perf diff: -10%.

closes INT-3186

@nyunyunyunyu nyunyunyunyu force-pushed the feat/direct-hint branch 4 times, most recently from 221cbd2 to 532cd19 Compare February 1, 2025 06:44

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@nyunyunyunyu nyunyunyunyu marked this pull request as ready for review February 1, 2025 17:02
@nyunyunyunyu nyunyunyunyu requested review from yi-sun, zlangley and jonathanpwang and removed request for yi-sun February 1, 2025 17:06

This comment has been minimized.

@jonathanpwang
Copy link
Contributor

Please fill out Perf PR Template.

@jonathanpwang jonathanpwang added the run-benchmark triggers benchmark workflows on the pr label Feb 1, 2025
docs/specs/ISA.md Outdated Show resolved Hide resolved

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except update spec and many sibling_id were not renamed to proof_id

This comment has been minimized.

Copy link

github-actions bot commented Feb 4, 2025

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (-604 [-28.2%]) 1,536 (-308113 [-60.0%]) 205,675 (-8465997 [-45.2%]) 10,244,416 - - -
fibonacci_program (-12 [-0.2%]) 4,988 1,500,095 51,485,080 (-795 [-11.5%]) 6,126 (-676416 [-35.1%]) 1,248,380 (-18587328 [-26.8%]) 50,830,327
regex_program (+20 [+0.1%]) 14,813 1,914,103 165,455,373 (-2184 [-7.6%]) 26,586 (-1370872 [-23.3%]) 4,512,717 (-37670496 [-14.6%]) 221,226,909
fib_e2e 35,147 1,515,083 410,691,902 39,691 7,374,941 306,395,181
ecrecover_program (-20 [-0.8%]) 2,514 284,567 15,055,723 (-1348 [-7.6%]) 16,470 (-636266 [-15.3%]) 3,521,596 (-17488962 [-9.4%]) 169,243,375

Commit: 8c0088c

Benchmark Workflow

@jonathanpwang jonathanpwang merged commit 43c4ccd into main Feb 4, 2025
19 checks passed
@jonathanpwang jonathanpwang deleted the feat/direct-hint branch February 4, 2025 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-benchmark triggers benchmark workflows on the pr run-benchmark-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants