Skip to content
NewA calmer, faster ZeroHour

Writing Rust code that's fast by asking agents to make the code faster

Hacker News · AIby mooreds ()14 min read4
AI summary · grok-4.7Summaries by Vani AI

A developer shows agentic models, including Claude Opus 4.5, can iteratively optimize Rust for 2x-20x speedups.

A developer reports that modern coding agents can iteratively rewrite Rust until benchmarks stop improving, producing large speedups. Using Claude Opus 4.5, and earlier Claude Sonnet 3.5, the author reimplemented UMAP in Rust with PyO3 bindings while forbidding unsafe code. Guardrailed prompts, criterion benchmarks, and libraries such as faer and simsimd yielded roughly 2x to 20x gains depending on the domain. Prompts and benchmark results are included.

Key facts
  • Opus 4.5 iteratively optimized Rust against pass/fail benchmark targets.
  • Reported speedups range from about 2x to 20x by domain.
  • UMAP was rewritten from scratch with PyO3 and no unsafe code.
  • criterion tracked statistically significant gains across data sizes.
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

14 min read at minimaxir.com

In January 2025, I had a fun hypothesis for a blog post : can LLMs write better code if you keep asking them to “write better code”? That was prior to the advent of robust agentic coding, but Claude Sonnet 3. 5 was still able to iteratively improve on algorithmic Python code.

Hacker News · AI

By mooreds · minimaxir.com

Read the full article at Hacker News · AI

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.