I wrote a 70x faster SQL parser while barely looking at the code - PostHog
After the success of using agents to improve query performance through autoresearch, I wanted to try something more ambitious.I rewrote PostHog's SQL parser using multiple long-running Claude Code sessions in parallel. The result was 16K lines of "hand"-rolled parser code, 5K lines of tooling, a few more K of tests, and a ~70x speed up.The new parser is equivalent to the previous one for all realistic queries, only differing for a tiny subset of queries written by an evil trickster deity (there’...
Read more at posthog.com