Skip to content

Commit f0b509c

Browse files
docs: sync from coderbuzz/codex@b36584c
1 parent 76a83b5 commit f0b509c

2 files changed

Lines changed: 19 additions & 21 deletions

File tree

‎AI_KNOWLEDGE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- docs: sync from coderbuzz/codex@7af404c -->
1+
<!-- docs: sync from coderbuzz/codex@b36584c -->
22

33
# @coderbuzz/sql — AI Expert Knowledge Reference
44

‎README.md‎

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- docs: sync from coderbuzz/codex@7af404c -->
1+
<!-- docs: sync from coderbuzz/codex@b36584c -->
22

33
# @coderbuzz/sql
44

@@ -65,6 +65,23 @@ This is not an ORM. There are no lazy-loaded relations, no magical `save()` meth
6565
- **Infer types** — `InferRow<S>`, `InferSelect<S, F>` for subset field selection
6666
- **Runtime agnostic** — Bun, Node.js, Deno
6767

68+
## Benchmarks
69+
70+
Full results at **[github.com/coderbuzz/benchmarks](https://github.com/coderbuzz/benchmarks)**.
71+
72+
SQL query compilation throughput on Apple M-series, Bun runtime. Higher is better.
73+
74+
| Scenario | @coderbuzz/sql | Kysely | Factor vs Kysely | Drizzle ORM | Factor vs Drizzle |
75+
|---|---|---|---|---|---|
76+
| SELECT simple | **1,700,391 ops/s** | 561,869 | **3.0x** | 34,239 | **49.7x** |
77+
| SELECT JOIN (2 tables) | **2,208,322 ops/s** | 310,690 | **7.1x** | 16,801 | **131.4x** |
78+
| INSERT single row | **2,954,261 ops/s** | 393,159 | **7.5x** | 55,085 | **53.6x** |
79+
| INSERT batch 100 rows | **134,187 ops/s** | 17,634 | **7.6x** | 914 | **146.8x** |
80+
| CTE (WITH clause) | **831,703 ops/s** | 224,893 | **3.7x** | 12,222 | **68.0x** |
81+
| 10 nested WHERE conditions | **656,309 ops/s** | 117,064 | **5.6x** | 12,692 | **51.7x** |
82+
83+
`@coderbuzz/sql` is 3-7x faster than Kysely and 50-147x faster than Drizzle ORM across every query type. The gap widens with query complexity (batch, JOIN, conditions) due to `@coderbuzz/sql`'s zero-overhead string compilation strategy vs Kysely's AST-based approach and Drizzle's ORM abstraction layer.
84+
6885
---
6986

7087
## Installation
@@ -140,25 +157,6 @@ db.close();
140157

141158
---
142159

143-
## Benchmarks
144-
145-
Full results at **[github.com/coderbuzz/benchmarks](https://github.com/coderbuzz/benchmarks)**.
146-
147-
SQL query compilation throughput on Apple M-series, Bun runtime. Higher is better.
148-
149-
| Scenario | @coderbuzz/sql | Kysely | Factor vs Kysely | Drizzle ORM | Factor vs Drizzle |
150-
|---|---|---|---|---|---|
151-
| SELECT simple | **1,700,391 ops/s** | 561,869 | **3.0x** | 34,239 | **49.7x** |
152-
| SELECT JOIN (2 tables) | **2,208,322 ops/s** | 310,690 | **7.1x** | 16,801 | **131.4x** |
153-
| INSERT single row | **2,954,261 ops/s** | 393,159 | **7.5x** | 55,085 | **53.6x** |
154-
| INSERT batch 100 rows | **134,187 ops/s** | 17,634 | **7.6x** | 914 | **146.8x** |
155-
| CTE (WITH clause) | **831,703 ops/s** | 224,893 | **3.7x** | 12,222 | **68.0x** |
156-
| 10 nested WHERE conditions | **656,309 ops/s** | 117,064 | **5.6x** | 12,692 | **51.7x** |
157-
158-
`@coderbuzz/sql` is 3-7x faster than Kysely and 50-147x faster than Drizzle ORM across every query type. The gap widens with query complexity (batch, JOIN, conditions) due to `@coderbuzz/sql`'s zero-overhead string compilation strategy vs Kysely's AST-based approach and Drizzle's ORM abstraction layer.
159-
160-
---
161-
162160
## Core Concepts
163161

164162
| Concept | What it does |

0 commit comments

Comments
 (0)