# Musql, JIT-compiled SQL, up to 300x faster than SQLite, 100…

Howdy HN! Missing a fast pure Go embedded SQL database. The issue is that compared to C, go is slow. Having done a lot of JIT in go, I naturally wanted to stick a JIT that generates native query kernels and see what happens. Result: musql. Pronounced "muscle." On a 100K-row filtered count, musql ta…

- **Page:** https://magpie.gallery/i/musql-jit-compiled-sql-up-to-300x-faster-than-sqli-yt4f
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Tags:** sql, database, jit, go, embedded

## Source

Web · dsamy: Musql, JIT-compiled SQL, up to 300x faster than SQLite, 1000x vs. Turso

- **Original:** https://news.ycombinator.com/item?id=49988641

> Howdy HN! Missing a fast pure Go embedded SQL database. The issue is that compared to C, go is slow. Having done a lot of JIT in go, I naturally wanted to stick a JIT that generates native query kernels and see what happens. Result: musql. Pronounced "muscle." On a 100K-row filtered count, musql takes 21 µs: about 300x faster than C SQLite and nearly 1,000x faster than Turso. Single-threaded, warm cache, using musql's direct API, native C SQLite, and Turso's Go driver. Filtered sums are 130x faster than C SQLite, grouped aggregates 95x. It works with Go's database/sql or through a server for libSQL clients. It uses its own storage format, with SQLite import/export. And yes, the SQL VM runs DOOM. Code, setup, and benchmarks: https://github.com/samyfodil/musql https://github.com/samyfodil/musql

## GitHub projects

- https://github.com/samyfodil/musql

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
