ELSEIF
Your brief EB
172 stories from 125 feeds 516 clusters Refreshed 3 minutes ago next pull 09:11

PERFORMANCE Signal 601 2 feeds carried it

pgrust JIT compiler compiles SQL queries in around 5μs using copy-and-patch

The pgrust database project built a JIT compiler that achieves around 5μs compile times by directly targeting assembly with a copy-and-patch approach, enabling JIT compilation of every SQL query rather than only a subset.

WHY IT MATTERS

Traditional database JIT compilers rely on LLVM or C/C++ code generation, both of which have high compile times that limit when compilation is worthwhile. At 5μs, the compilation cost is low enough to apply JIT optimization to every query, including single-execution ones. The author also notes that AI assistance made directly targeting assembly far more approachable than historically expected.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The pgrust JIT compiler achieves around 5μs compile times by directly targeting assembly using a copy-and-patch variant rather than LLVM or C/C++ code generation.

02

This compile speed enables JIT compilation of every SQL query, not just frequently-executed subsets that can amortize higher compilation costs.

03

AI assistance significantly reduced the difficulty of writing a JIT compiler that targets assembly directly, a task the author initially expected to be much harder.

THE CLUSTER

Same story, 2 feeds.

ORDERED BY FIRST SEEN
malisper.me via Lobsters JIT Compiling Code in 5μs Open ↗
malisper.me via Hacker News JIT Compiling Code in 5μs Open ↗