Skills
minimaxir's agentic Rust optimization loop: benchmark gate, banned shortcuts, cheap subagents and a 'breakthrough' pass, compounding to 7.5-32x
Max Woolf published the prompts behind a loop that sped up his Rust projects. Set a criterion baseline, require at least 1.2x, and tell the agent to keep iterating until benchmarks stop improving. Forbid unsafe code, benchmark manipulation and target-cpu=native. Explicitly allow radical low-level changes. Fan out 7-12 cheap GPT-5.6 Luna subagents, then run a 20% line-cut refactor pass, which unexpectedly gave double-digit speedups. Finish with a 'try a breakthrough, don't give up easily' pass. Each model generation added 1.5-2x, and his UMAP port runs 4-15x faster than umap-learn. This is a single practitioner report, so the numbers are unaudited.
Source
↳ Follow the thread