Rust tip: codegen-units = 1 makes uv build 50% faster with 67% less memory
charliermarsh · x · 2026-10-08
uv author Charlie Marsh shares a counterintuitive Rust build optimization: setting codegen-units = 1 made the uv build 50% faster, cut peak memory by 67%, and shrank the binary by 17% — surprising since more codegen units usually improve build times.
He adds that PGO amplifies the effect: the instrumented binary build became >90% faster, and the final non-instrumented build also got faster, though less dramatically.
Related event: Setting codegen-units=1 Speeds Up uv Builds by 50%, Cuts Memory 67%(3 posts)→
More from coding & agent
- Free Inspector Tool Generates IGA-Style Review Packets for MCP/A2A Agent Protocols — ContextIQ · 2026-10-08
- GLM 5.3 Flash as a hardware hacking assistant: local 55 tok/s with 1M context — glenbeer · 2026-10-08
- Splash 1.3.0 cuts local agent first-token time from 19s to 1s via SSD offloading — songhan_mit · 2026-10-08
- Antigravity 2 v2.21.1 & CLI updates ship full-text chat search and Automations tab — rseroter · 2026-10-08
- AI Builds an Email Inbox in an Afternoon, But Deliverability Is a Lifetime Ordeal — dosco · 2026-10-08
- Building simulated worlds is easy; running them on potatoes is not — gandamu_ml · 2026-10-08