Tech & AI News
Hacker News

JIT Compiling Code in 5μs

The pgrust database’s JIT compiler generates machine code in roughly 5 μs, allowing every SQL query to be compiled on the fly instead of only a subset. Using AI-assisted assembly generation, the author demonstrates how to create a fast JIT by building a tiny regular-expression engine that supports literals, concatenation and repetition, achieving performance comparable to handcrafted code.