Evaluating Compiler Optimization Impacts on zkVM Performance
Thomas Gassmann, Stefanos Chaliasos, Thodoris Sotiropoulos, Zhendong Su
摘要
Zero-knowledge proofs (ZKPs) are the cornerstone of programmable cryptography. They enable (1) privacypreserving and verifiable computation across blockchains, and (2) an expanding range of off-chain applications such as credential schemes. Zero-knowledge virtual machines (zkVMs) lower the barrier by turning ZKPs into a drop-in backend for standard compilation pipelines. This lets developers write proof-generating programs in conventional languages (e.g., Rust or C++) instead of hand-crafting arithmetic circuits. However, these VMs inherit compiler infrastructures tuned for traditional architectures rather than for proof systems. In particular, standard compiler optimizations assume features that are absent in zkVMs, including cache locality, branch prediction, or instruction-level parallelism. Therefore, their impact on proof generation is questionable.
We present the first systematic study of the impact of compiler optimizations on zkVMs. We evaluate 64 LLVM passes, six standard optimization levels, and an unoptimized baseline across 58 benchmarks on two RISC-V-based zkVMs (RISC Zero and SP1). While standard LLVM optimization levels do improve zkVM performance (over 40%), their impact is far smaller than on traditional CPUs, since their decisions rely on hardware features rather than proof constraints. Guided by a performance impact analysis, we slightly refine a small set of LLVM passes to be zkVM-aware, improving zkVM execution time by up to 45% (average +4.6% on RISC Zero, +1% on SP1) and achieving consistent proving-time gains. Our work highlights the potential of compiler-level optimizations for zkVM performance and opens new directions for zkVM-specific passes, backends, and superoptimizers.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
它引用的 Paper9
- Ligero: Lightweight Sublinear Arguments Without a Trusted SetupScott Ames, Carmit Hazay, Yuval Ishai, Muthuramakrishnan VenkitasubramaniamCCS 2017 · 338 次引用
- Nova: Recursive Zero-Knowledge Arguments from Folding SchemesAbhiram Kothapalli, Srinath T. V. Setty, Ioanna TziallaCRYPTO 2022 · 123 次引用
- Unlocking the Lookup Singularity with LassoSrinath T. V. Setty, Justin Thaler, Riad S. WahbyEUROCRYPT 2024 · 61 次引用
- Unleashing the hidden power of compiler optimization on binary code difference: an empirical studyXiaolei Ren, Michael Ho, Jiang Ming, Yu Lei 等PLDI 2021 · 57 次引用
- GZKP: A GPU Accelerated Zero-Knowledge Proof SystemWeiliang Ma, Qian Xiong, Xuanhua Shi, Xiaosong Ma 等ASPLOS 2023 · 47 次引用
相关 Paper
- Arguzz: Testing zkVMs for Soundness and Completeness BugsChristoph Hochrainer, Valentin Wüstholz, Maria ChristakisUSENIX Security 2026 · 2 次引用
- UniZK: Accelerating Zero-Knowledge Proof with Unified Hardware and Flexible Kernel MappingCheng Wang, Mingyu GaoASPLOS 2025 · 12 次引用
- Ou: Automating the Parallelization of Zero-Knowledge ProtocolsYuyang Sang, Ning Luo, Samuel Judson, Ben Chaimberg 等CCS 2023 · 2 次引用
- Zero Knowledge for Everything and Everyone: Fast ZK Processor with Cached ORAM for ANSI C ProgramsDavid Heath, Yibin Yang, David Devecsery, Vladimir KolesnikovS&P 2021 · 22 次引用
- ZEE200: Zero Knowledge for Everything and Everyone @ 200 KHzSunghyeon Jo, Vladimir Kolesnikov, Yibin YangCCS 2026
