Spotted · Checked · Timestamped

Spots by DeHub

Show HN Musql JIT-compiled SQL: Show HN: Musql, JIT-compiled SQL, up to 300x faster than SQLite, 1000x vs. Turso

In this story

Show HN: Musql, JIT-compiled SQL, up to 300x faster than SQLite, 1000x vs. Turso

Howdy HN!<p>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.<p>Result: musql. Pronounced &quot;muscle.&quot;<p>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&#x27;s direct API, native C SQLite, and Turso&#x27;s Go driver. Filtered sums are 130x faster than C SQLite, grouped aggregates 95x.<p>It works with Go&#x27;s database&#x2F;sql or through a server for libSQL clients. It uses its own storage format, with SQLite import&#x2F;export. And yes, the SQL VM runs DOOM.<p>Code, setup, and benchmarks: <a href="https:&#x2F;&#x2F;github.com&#x2F;samyfodil&#x2F;musql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;samyfodil&#x2F;musql</a>

Hacker News (front page) · 8 days
Show HN: Musql, JIT-compiled SQL, up to 300x faster than SQLite, 1000x vs. Turso

Howdy HN!<p>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.<p>Result: musql. Pronounced &quot;muscle.&quot;<p>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&#x27;s direct API, native C SQLite, and Turso&#x27;s Go driver. Filtered sums are 130x faster than C SQLite, grouped aggregates 95x.<p>It works with Go&#x27;s database&#x2F;sql or through a server for libSQL clients. It uses its own storage format, with SQLite import&#x2F;export. And yes, the SQL VM runs DOOM.<p>Code, setup, and benchmarks: <a href="https:&#x2F;&#x2F;github.com&#x2F;samyfodil&#x2F;musql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;samyfodil&#x2F;musql</a>

Hacker News (Show HN) · 8 days

← Running stories