Peter J. Liu (@peterjliu) on X

X (formerly Twitter) ·

2 min read Original article ↗

Peter J. Liu on X: "With AI we re-wrote the Excel engine in Rust to run headless for agents, deployed in Compound to the world’s top investment firms. Our Excel engine in some cases 100x faster and near 100% fidelity with Excel (much better than LibreOffice). This is how we did it."

  • user avatar

    With AI we re-wrote the Excel engine in Rust to run headless for agents, deployed in Compound to the world’s top investment firms. Our Excel engine in some cases 100x faster and near 100% fidelity with Excel (much better than LibreOffice). This is how we did it.

  • user avatar

    Excel is used by billions of humans to work synchronously through a UI. But for agents to be maximally productive, it’s better to run programs headless via API. Excel has been optimized over decades (written in C++) yet some of our customers have huge workbooks with hundreds of

    user avatar

    Nothing else like our engine exists. Google Sheets and LibreOffice have missing important functions (e.g. many dynamic arrays) or have significant discrepancies at the edges that are deal-breakers for our discerning, high-finance customers. A wrong value in a cell can have

    user avatar

    We started by looking at IronCalc, an open-source Rust Excel engine, but quickly realized it was missing tons of features and was pretty slow. We used multiple agentic loops (wrote over 800k lines of Rust) to hill-climb well-defined objectives: 1. Match Excel values over

    user avatar

    Most Excel Agents (e.g. Claude in Excel) are either implemented as Add-ins to side-step the need to implement an Excel engine, but require Excel to be open. With our headless engine, Compound users don’t suffer from this limitation and can work on countless Workbooks in

    user avatar

    Rust turned out to be a great choice (LLMs clearly know it). It’s as fast as C++ but saner. Bad-practices are basically compile-time errors, which means AI-code gets nice guard-rails and human review is less important. I didn't know Rust before this project, but a solid