AI agents help narrow CompCert’s performance gap with GCC -O2

Aananth V, a master’s student working with InfraAI, reported results from accelerating the formally verified C compiler CompCert. AI coding agents produced nearly 15,000 lines of Rocq, including optimization implementations and correctness proofs. The project, called faster-compcert, has published its code and benchmarking scripts.
The author first tested whether CompCert’s formal semantic restrictions explained most of its performance deficit. Disabling vectorization, fused multiply-add and other corresponding optimizations in GCC barely changed the gap: CompCert remained 26% slower on its own benchmarks and 54% slower on PolyBench. The experiment points instead to missing optimizations and suboptimal instruction selection as the main contributors.
The team added five passes and improved existing ones, including moving computations out of loops and eliminating redundant memory loads. Final measurements on an Intel Xeon Silver 4314 put faster-compcert 4–6.1% behind full GCC -O2 on the CompCert suite and 13.5–14.2% behind on PolyBench, depending on settings. Both suites were used during development. On five larger programs held out for evaluation, the remaining gap was 8.5–9.1%.
The report also highlights a limit of formal verification: proofs depend on an accurate system model. An agent found a counterexample while trying to prove a human-approved proposal for merging memory loads. The team subsequently required trusted-base proposals to include a mechanically proved key soundness lemma and differential testing against a real CPU or glibc before human approval.
Original source: ut-infraai.github.io ↗
Comments on source platforms
Rank is the maximum of the latest discussion counts. These are source metrics.
Hacker News
- Discussion ↗: 3
Measured: 19 Nov 2026, 22:10 UTC