uv creator sped up thread listing ~80% by having Codex apply Tokio batch-I/O rules
charliermarsh · x · 2026-10-07
Charlie Marsh, creator of uv at Astral, shares a hands-on example of using AI coding agents for performance work: he instructed Codex to apply the rule "batch I/O in one blocking Tokio task," which surfaced major speedups across common uv workflows — thread listing got 80% faster.
Two reproducible approaches:
- Point your agent at the "Principles for fast Tokio applications" guide and ask it to apply the rules to your project.
- Or link a relevant uv PR (e.g., streaming ZIP extraction inside a blocking task) and let the agent find similar opportunities.
The PR bundles streaming ZIP extraction into one blocking task per archive with a bounded 256 KiB buffer and reuses the copy buffer across files. Cold wheel installs dropped sharply: Jupyter 2181ms → 719ms (-67%), SymPy -50%, NumPy 582ms → 381ms.
Related event: Astral's Charlie Marsh Speeds Up Codex ~80% by Teaching It Tokio Principles(3 posts)→
More from coding & agent
- Your test suite costs $10 per run: the hidden CI bill of PR maxers — zeeg · 2026-10-07
- VelaTerm: Open-Source Terminal Lets Claude Code Agents Read Each Other's Chats and Orchestrate — george-lin · 2026-10-07
- Keep a 'dissent register' from day one when collaborating with AI agents — repligate · 2026-10-07
- Dev builds MCP server that rewrites Claude output in your voice, using 3-layer agent memory — nhrkhare · 2026-10-07
- What If AI Agents Remembered Like Living Systems? A Mycelial Framework for Agent Memory — repligate · 2026-10-07
- Tag a bot on X and it runs agents on your home computer while you scroll — ns123abc · 2026-10-07