Rewriting Excel in Rust with AI Agents: 800k Lines, 100x Faster
peterjliu · x · 2026-08-03
The Compound team leveraged frontier AI coding agents to rewrite a headless Excel engine in Rust, specifically designed for AI agents in the financial sector. In some cases, the engine is 100x faster than native Excel with near 100% fidelity.
Technical Implementation:
- Dropping Open Source: They initially tried the open-source IronCalc but found it slow and feature-lacking. Instead, they used multiple agentic loops to rewrite the engine from scratch, generating over 800,000 lines of Rust code.
- Key Objectives:
- Precisely match Excel values across millions of cells in hundreds of thousands of real-world files.
- Maximize speed using micro-benchmarks and advanced graph algorithms (treating spreadsheets as graphs).
- Ensure valid XLSX loading/editing/saving compliant with a 6,000+ page spec.
- Why not Google Sheets or LibreOffice: For top-tier financial firms, discrepancies in edge-case functions (like dynamic arrays) can cause disastrous chain reactions. Native Excel also chokes for minutes on massive workbooks, whereas the new engine processes them in seconds.
Related event: Compound Rewrites Excel Engine in Rust for 100x Speedup(2 posts)→
More from coding & agent
- OpenAI Codex Generates Perfectly Fitting 3D Print File in One Shot — nickbaumann_ · 2026-08-03
- Teknium Shares Tutorial on Setting Up Hermes Agent in Buzz for Multi-Device Collaboration — Teknium · 2026-08-03
- Current AI Agents Lack the Human 'Power Law of Practice' — xwang_lk · 2026-08-03
- 95% of agent skills missing activation directives, GitHub scan reveals — rseroter · 2026-08-03
- Tracking 'Shadow AI' in WordPress: Monitoring Unauthorized HTTP Calls — HaktanSuren · 2026-08-03
- Microsoft Launches IQ Live Series for Enterprise Context-Aware Agent Architectures — DanWahlin · 2026-08-03