Programming at Light Speed: Building the Gravity Query Engine
The authors introduce Gravity, a new query engine in pgrust v0.4-beta that compiles SQL into machine code at runtime and achieves up to three times the performance of ClickHouse. To approach the physical speed limit of the hardware, the developers used Claude to generate optimized reference code, implemented a multi-stage compiler pipeline with a Lisp-based intermediate representation, and added three columnar-specific planner algorithms. Open article →