paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Evaluating Compiler Optimization Impacts on zkVM Performance

评估编译器优化对 zkVM 性能的影响
ASPLOS Proceedings of the 31st ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 22026匹配度 2/10 · 论文聚焦 zkVM 场景下 LLVM 优化对证明生成性能的影响,属于编译器/程序分析方向,但未涉及用户核心关注的静态分析×AI/Agent、浮点程序分析、贝叶斯程序分析,也未使用 LLM/Agent 改进分析或验证,因此与画像匹配度较低。引用 3 inbox
Thomas Gassmann, Stefanos Chaliasos, Thodoris Sotiropoulos, Zhendong Su
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:首次系统研究 LLVM 优化对 zkVM 的影响,并改造少量 pass 以提升证明生成性能。

零知识证明使可验证隐私计算成为可能,而 zkVM 让开发者可用 Rust/C++ 等常规语言编写证明生成程序。然而,zkVM 继承了面向传统架构的编译基础设施,标准编译器优化所依赖的缓存局部性、分支预测和指令级并行等特性在 zkVM 中并不存在,因此其优化效果存疑。本文首次系统研究编译器优化对 zkVM 性能的影响,在 RISC Zero 和 SP1 两个基于 RISC-V 的 zkVM 上,对 58 个基准测试评估了 64 个 LLVM pass、六个标准优化级别以及未优化基线。结果表明,标准 LLVM 优化虽能提升超过 40% 的 zkVM 性能,但远小于其在传统 CPU 上的效果,因为优化决策依赖硬件特性而非证明约束。基于性能影响分析,作者将少量 LLVM pass 改造为 zkVM-aware,使执行时间最多提升 45%,RISC Zero 平均提升 4.6%,SP1 平均提升 1%,并获得稳定的证明时间收益。

问题
标准编译器优化面向传统 CPU 架构设计,其依赖的缓存局部性、分支预测和指令级并行等特性在 zkVM 中缺失,因此这些优化对 zkVM 证明生成性能的实际影响尚不明确。
方法
在两个基于 RISC-V 的 zkVM(RISC Zero 和 SP1)上,对 58 个基准测试系统评估 64 个 LLVM pass、六个标准优化级别与未优化基线,并基于性能影响分析改造少量 LLVM pass 使其感知 zkVM 特性。
评估
通过对比标准 LLVM 优化级别与基线,发现标准优化带来超过 40% 的性能提升但远低于传统 CPU;经 zkVM-aware 改造后,执行时间最多提升 45%,RISC Zero 平均提升 4.6%,SP1 平均提升 1%,且证明时间有一致收益。
原文摘要(Abstract)

Zero-knowledge proofs (ZKPs) are the cornerstone of programmable cryptography. They enable (1) privacy-preserving 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.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2508-17518,
  title = {Evaluating Compiler Optimization Impacts on zkVM Performance},
  author = {Thomas Gassmann and Stefanos Chaliasos and Thodoris Sotiropoulos and Zhendong Su},
  booktitle = {ASPLOS},
  year = {2026},
  doi = {10.1145/3779212.3790159}
}