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

ISA efficiency comparison #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

ISA efficiency comparison #5

wants to merge 1 commit into from

Conversation

mratsim
Copy link
Contributor

@mratsim mratsim commented Nov 8, 2024

This adds an instruction count cycle to SP1 to ease comparison between Valida ISA and RISC-V ISA.

This is interesting due to the following

zkVMs ISA Proof System
Jolt RISC-V Spartan (sumcheck, multilinear)
SP1 RISC-V Plonky3 (FRI, univariate)
Valida RISC-V Plonky3 (FRI, univariate)

Video

keccak-ISA-efficiency-bench.mp4

Instructions count:

Valida (native): 15289
SP1 (native): 16800 keccak, 24100 total
SP1 (precompile): 706 keccak, 7916 total

What can we conclude from this?

In general we cannot compare 2 zkvms on raw instruction count and infer efficiency, this can be seen with SP1 keccak precompile with 3x less instructions yet slower proof generation for a single keccak than native execution.

However, for RISC-like instructions (so no complex super instructions like Keccak), and on the same proof system (Plonky3), less instructions usually mean less work for the prover.

@mratsim mratsim changed the title ISA bench ISA efficiency comparison Nov 8, 2024
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.

1 participant