Lean Proofs Verify Agent-Found Optimizations: DuckDB Query 9x Faster With Identical Results
paraschopra · x · 2026-12-06
Paras Chopra suggests using Lean to formally prove that optimizations and speedups found by coding agents don't change results — "literal free alpha."
Example: a DuckDB dashboard query got 9x faster and used one-third the RAM (1.80 → 0.20s, 547 → 182 MiB peak memory) against a stronger native baseline, with all 64 counts matching on 3.48M taxi trips. The trick: for each fare cutoff, keep the longest qualifying trip to each destination — one number answers every distance cutoff without rebuilding distinct-destination sets. Lean checked why this preserves the counts.
More from coding & agent
- App Store Connect CLI nearing 5 million events this week — rudrank · 2026-12-06
- icm-architect: Agent skill turns folder structures into agent architecture, gains 2.8k stars in a day — RinDig · 2026-12-06
- SEO veteran turns Claude Code loose on Search Console to surface striking-distance keywords ranked 11-20 — iannuttall · 2026-12-06
- Developer builds phone-controlled PC agent system with screen vision and proactive emergency calls — xiaohu · 2026-12-06
- Gamedev tip: build a 'greybox gym' to find the fun before committing to final assets — chongdashu · 2026-12-06
- Claude flies a $100 drone to find a photo — intelligence is ready, latency isn't — mhdfaran · 2026-12-06