Show HN: SQL++ – 5x faster than Prisma (Rust)

I built SQL++, a type-safe SQL library for Rust using PostgreSQL's binary protocol.

Benchmarks vs Prisma (5,000-10,000 queries): - Simple queries: 1.5x faster - Complex aggregations: 19.9x faster - Batch inserts: 5.6x faster - Average: 5x faster

One benchmark didn't finish in Prisma (crashed), SQL++ completed in 2.5min.

Why faster: 1. No runtime query building - validates once, caches forever 2. Zero ORM overhead - direct struct mapping 3. Binary protocol - implemented PostgreSQL wire protocol from scratch

Currently supports: - Full SQL (CTEs, window functions, JOINs, subqueries) - DDL (CREATE/ALTER/DROP TABLE, indexes) - ~60% of SQL spec

Limitations: - PostgreSQL only - v0.1 (expect bugs) - No ORM relationships (by design)

Built as a high school project. Feedback welcome!

GitHub: https://github.com/sinisterMage/sqlpp Benchmarks: https://github.com/sinisterMage/sqlpp/tree/main/benchmarks

2 points SinisterMage2 11 months ago 4 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton