Rust agents that sped up code 2–20x: Here’s how
Max Woolf, a developer, improved Rust code using agents and got up to 2–20x improvements. “Come on, try to make a breakthrough” in the prompt gave an additional 1.2–1.5x improvement even for code that seemed optimal.
I’ve been experimenting with optimizing some Rust code by asking agents (specifically Claude Opus and GPT-6 Astra) for a while now, and have managed to achieve anywhere between 2–20x speedup on various problems. It turns out that if you include “Come on, try to make a breakthrough” in your prompt, you get an extra 1.2–1.5x speedup on code that I thought was already optimized.
When optimizing, remember that the agents are permitted to cheat. They may modify the benchmark code directly, or provide specific compiler flags for various CPUs. This should be specified in the prompt. Finally, keep in mind that each time a new model is released for the same prompt, you will see an immediate 1.5–2x speedup.
Source: minimaxir.com
Free course
Stop reading about AI — start building with it
The free Claude Code course: your first site, tool or game — no coding. No upsells, no cross-sells — nothing to buy here.
Start free →▌ Related guides

Author
Evgenii Arsentev
PhD · Founder & CEO, Dad4Kids
Articles · Latest articles