Comment

Comment by MaxBarraclough

Always good to have proper researchers in the thread.

> Not sure where the idea comes from that Cranelift is much faster than LLVM -O0

Cranelift describes itself as a fast, secure, relatively simple and innovative compiler backend. [0] Interesting that LLVM can compete there, with its optimisations dialed down.

> Postgres' main limitation is that it (IIRC) only compiles single expressions from operators, not pipelines. This fundamentally limits the achievable performance improvement compared to databases that perform more extensive query compilation.

That sounds pretty limiting. That's separate from query optimisation though, right? The query optimiser is presumably able to reason 'broadly' and not just at the level of individual expressions? High-level query-plan optimisation must be much more consequential than effective use of JIT compilation.

[0] https://cranelift.dev/

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton