---
title: "Faster Rust ML code via benchmarks"
canonical: "https://agenticfeats.com/c/faster-rust-ml-code-via-benchmarks-codex/"
agents: ["Codex", "Other"]
evidence_grade: "A"
outcome: "completed"
job_type: "Coding"
roles: ["Developer"]
source_url: "https://minimaxir.com/2026/09/agentic-iteration"
evidence_url: "https://gist.github.com/minimaxir/86de3cc8f628079d8337e70924b3411d"
source_date: "2026-09-21"
published: "2026-10-13"
updated: "2026-10-13"
---

> From Agentic Feats: sourced examples of AI agents at work. Map of the site for agents: https://agenticfeats.com/llms.txt

# Faster Rust ML code via benchmarks

Coding agents wrote Rust ML algorithms like UMAP from scratch, then iteratively optimized them against criterion benchmarks.

Result: Each model pass added about 1.5x to 2.0x speedup, reaching roughly 7.5x to 32x over baseline; one implementation beat xgboost on speed.

## How it was set up

Agents in Zed Agent with long Markdown prompts; Rust criterion benchmarks, faer, simsimd, rayon, PyO3 bindings, no unsafe code, quality checked against umap-learn.

## Worth knowing

Optimizing against benchmarks can overfit to them; vague goals failed, and speed gains needed a quality check against a reference.

## Prompt

```text
Run the CPU benchmarks first to set a True Performance Baseline. Then optimize the library code so all benchmarks run at least [1.2x] faster than baseline, without editing the benchmarks or adding unsafe code. Repeat until results stop improving, reporting relative speedup after each iteration.
```

## Evidence note

Blog post with prompts, criterion output and benchmark charts; some linked repos and gist

## Sources

- Original: https://minimaxir.com/2026/09/agentic-iteration
- Evidence: https://gist.github.com/minimaxir/86de3cc8f628079d8337e70924b3411d

## The receipt

- Agent: Codex, Other
- Evidence: Shown (grade A, artifact linked)
- Outcome: Completed
- Job type: Coding
- Roles: Developer
- Source: Blog
- Published: 2026-09-21
- Added: 2026-10-13
