← All projects
Project record1 mention
Originally shared on Hacker News

Agentic iterative code optimization

A methodology for speeding up code with LLMs: the model builds a real-world representative benchmark, then iteratively optimizes it without cheating the benchmark while ensuring a quality metric (e.g., MSE for machine learning algorithms) does not regress. Highly effective with GPT 5.5, and a recent prompt optimization yields another 2x average speed improvement on top.

Last shared
01 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Agentic iterative code optimization

    A methodology for speeding up code with LLMs: the model builds a real-world representative benchmark, then iteratively optimizes it without cheating the benchmark while ensuring a quality metric (e.g., MSE for machine learning algorithms) does not regress. Highly effective with GPT 5.5, and a recent prompt optimization yields another 2x average speed improvement on top.

    Posted by @minimaxir · Original source ↗

    Source text · @minimaxir · · Source ↗

    I have been experimenting more with agentic iterative optimization: using LLMs to actually speed up code by finding and testing lower-level optimizations, specifically by having it build a real-world representative benchmark, then tell the LLM to optimize that benchmark without a) cheating the benchmark and b) ensuring code quality by some metric does not regress, e.g. MSE for machine learning algorithms.