I wrote a 70x faster SQL parser while barely looking at the code
Blog post from PostHog
The author undertakes the ambitious task of rewriting PostHog's SQL parser using AI assistance through multiple long-running Claude Code sessions, resulting in a significant performance boost and a new parser that is 454 times faster than its predecessor. The undertaking involves creating a "hand"-written recursive-descent parser with a Pratt expression core, achieving complete agreement with the existing C++ ANTLR-based parser for realistic SQL queries. The approach combines property-based testing with code-generation tools to create inputs, alongside prompt engineering to address AI's brittle fixes, ultimately leading to a robust parser that can withstand rigorous testing. The new parser was developed in Rust, leveraging AI capabilities to achieve a task that would have traditionally taken months, illustrating a potential shift in how parsers might be developed in the future, with AI-generated high-performance parsers complementing traditional parser generators like ANTLR.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| LLM | 1 | 6,292 | 1,205 | 252 | -36% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.