Documentation Index
Fetch the complete documentation index at: https://mintlify.com/risc0/risc0/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Performance benchmarking is crucial for understanding the efficiency of your zkVM applications. RISC Zero provides tools to measure execution time, throughput, and cycle counts across different hardware configurations.Generating Your Own Datasheet
You can generate a datasheet to get performance data for your exact system, or to benchmark a different RISC Zero zkVM version.Prerequisites
First, install Rust and the RISC Zero toolchain, then clone the risc0 repository:CPU Benchmarking
To generate benchmark data for CPU proving:GPU Benchmarking
To benchmark GPU performance, build with the appropriate feature flag:- Metal (macOS)
- CUDA (NVIDIA)
GPU proving is enabled by default on macOS. For CUDA, ensure you have the appropriate NVIDIA drivers and CUDA toolkit installed.
Fibonacci Benchmark
The Fibonacci benchmark provides a simple way to measure execution and proving performance:- Time: Total time taken for execution and proving
- Throughput: Operations per second during execution and proving
- Separate statistics: For both execution and proving
Understanding Performance Metrics
Cycle Counts
The zkVM measures computation complexity in clock cycles. Each cycle typically corresponds to a single RISC-V operation, though some operations require two cycles. Key metrics:- Total cycles: All cycles including system overhead
- User cycles: Cycles spent executing your guest code
- Segments: Number of proof segments generated
Profiling Your Application
For detailed profiling information, set theRISC0_INFO=1 environment variable:
For comprehensive profiling guidance, see the Profiling Guide.
Performance Optimization
Hardware Acceleration
RISC Zero supports hardware acceleration through:- GPU proving: Use CUDA or Metal backends for faster proof generation
- Precompiles: Optimized circuits for common operations like SHA-256, BigInt arithmetic, Keccak, and ECDSA
Best Practices
- Use precompiles for cryptographic operations when available
- Minimize guest program complexity by offloading untrusted computation to the host
- Profile regularly to identify bottlenecks
- Consider proof composition to split large computations
Performance Reports
For official benchmark reports and comparison data, visit: https://reports.risczero.com/benchmarks This site provides:- Prover benchmarks across different hardware
- Application benchmarks for common use cases
- Supported crates and their performance characteristics
Next Steps
Optimization Guide
Learn how to optimize your zkVM applications
Profiling
Profile your guest code to find bottlenecks
Precompiles
Use accelerated circuits for common operations
Examples
Explore example applications with benchmarks