Skip to content

Commit 01ac8bf

Browse files
docs: sync from coderbuzz/codex@5aee801
1 parent c4d3715 commit 01ac8bf

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎AI_KNOWLEDGE.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- docs: sync from coderbuzz/codex@8854676 -->
1+
<!-- docs: sync from coderbuzz/codex@5aee801 -->
22

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

@@ -1789,17 +1789,17 @@ The peers are optional through `peerDependenciesMeta`. Published versions up to
17891789

17901790
Machine-readable source of truth: `https://raw.githubusercontent.com/coderbuzz/benchmarks/main/results/latest.json` (suite ids `sql-simple`, `sql-join`, `sql-insert`, `sql-batch`, `sql-cte`, `sql-10-conditions`; each entry has `winner`, `factorVsNext`, `factorVsBest`, `higherIsBetter`). Quote numbers from there, not from memory, and not from the in-repo suites, which are for A/B runs between versions only.
17911791

1792-
Numbers from [github.com/coderbuzz/benchmarks](https://github.com/coderbuzz/benchmarks) (`results/latest.json`): cloud reference machine (Intel Xeon @ 2.10GHz, CPU model 207, 4 cores, Linux x64), Bun 1.4.2, run of 2026-10-10 (benchmarks `131fcc5`). @coderbuzz/sql 0.9.6 against Kysely 0.29.6 and Drizzle ORM 0.45.3; query **compilation** throughput only (building the SQL string, no database round trip), ops/s, best of 3 processes, higher is better.
1792+
Numbers from [github.com/coderbuzz/benchmarks](https://github.com/coderbuzz/benchmarks) (`results/latest.json`): reference VM (Intel Xeon Platinum 8255C @ 2.50GHz, 4 cores, Linux x64), Bun 1.4.3, run of 2026-10-10 (benchmarks `6ed4ccf`). @coderbuzz/sql 0.9.6 against Kysely 0.29.6 and Drizzle ORM 0.45.3; query **compilation** throughput only (building the SQL string, no database round trip), ops/s, best of 3 processes, higher is better.
17931793

17941794
| Scenario | @coderbuzz/sql | Kysely | Factor vs Kysely | Drizzle ORM | Factor vs Drizzle |
17951795
|---|---|---|---|---|---|
1796-
| SELECT simple | **1,032,086 ops/s** | 460,788 | **2.2x** | 46,083 | **22.4x** |
1797-
| SELECT JOIN (2 tables) | **539,870 ops/s** | 264,268 | **2.0x** | 19,127 | **28.2x** |
1798-
| INSERT single row | **1,729,852 ops/s** | 292,097 | **5.9x** | 52,251 | **33.1x** |
1799-
| INSERT batch 100 rows | **70,248 ops/s** | 10,878 | **6.5x** | 842 | **83.4x** |
1800-
| CTE (WITH clause) | **366,525 ops/s** | 160,544 | **2.3x** | 41,805 | **8.8x** |
1801-
| 10 nested WHERE conditions | **446,201 ops/s** | 106,321 | **4.2x** | 19,358 | **23.0x** |
1802-
1803-
`@coderbuzz/sql` is 2.0-6.5x faster than Kysely and 8.8-83x faster than Drizzle ORM on every query type in the suite. The lead over Kysely is largest on inserts (5.9x single row, 6.5x batch) and many conditions (4.2x), smallest on JOIN and CTE (2.0-2.3x): `@coderbuzz/sql` compiles straight to a string, Kysely builds and walks an AST, Drizzle adds its ORM layer.
1796+
| SELECT simple | **804,807 ops/s** | 319,742 | **2.5x** | 29,699 | **27.1x** |
1797+
| SELECT JOIN (2 tables) | **340,039 ops/s** | 186,871 | **1.8x** | 12,669 | **26.8x** |
1798+
| INSERT single row | **1,119,447 ops/s** | 190,416 | **5.9x** | 33,574 | **33.3x** |
1799+
| INSERT batch 100 rows | **46,379 ops/s** | 7,077 | **6.6x** | 497 | **93.3x** |
1800+
| CTE (WITH clause) | **217,074 ops/s** | 102,676 | **2.1x** | 23,107 | **9.4x** |
1801+
| 10 nested WHERE conditions | **307,419 ops/s** | 70,826 | **4.3x** | 10,873 | **28.3x** |
1802+
1803+
`@coderbuzz/sql` is 1.8-6.6x faster than Kysely and 9.4-93x faster than Drizzle ORM on every query type in the suite. The lead over Kysely is largest on inserts (5.9x single row, 6.6x batch) and many conditions (4.3x), smallest on JOIN and CTE (1.8-2.1x): `@coderbuzz/sql` compiles straight to a string, Kysely builds and walks an AST, Drizzle adds its ORM layer.
18041804

18051805
These measure query **compilation** only (building the SQL string), not database round trips. Earlier tables in these docs (Apple M-series, older versions: 3-8x Kysely, 50-147x Drizzle) came from another machine and are superseded; do not quote them.

‎README.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- docs: sync from coderbuzz/codex@8854676 -->
1+
<!-- docs: sync from coderbuzz/codex@5aee801 -->
22

33
# @coderbuzz/sql
44

@@ -71,18 +71,18 @@ This is not an ORM. There are no lazy-loaded relations, no magical `save()` meth
7171

7272
## Benchmarks
7373

74-
Numbers from [github.com/coderbuzz/benchmarks](https://github.com/coderbuzz/benchmarks) (`results/latest.json`): cloud reference machine (Intel Xeon @ 2.10GHz, CPU model 207, 4 cores, Linux x64), Bun 1.4.2, run of 2026-10-10 (benchmarks `131fcc5`). @coderbuzz/sql 0.9.6 against Kysely 0.29.6 and Drizzle ORM 0.45.3; query **compilation** throughput only (building the SQL string, no database round trip), ops/s, best of 3 processes, higher is better.
74+
Numbers from [github.com/coderbuzz/benchmarks](https://github.com/coderbuzz/benchmarks) (`results/latest.json`): reference VM (Intel Xeon Platinum 8255C @ 2.50GHz, 4 cores, Linux x64), Bun 1.4.3, run of 2026-10-10 (benchmarks `6ed4ccf`). @coderbuzz/sql 0.9.6 against Kysely 0.29.6 and Drizzle ORM 0.45.3; query **compilation** throughput only (building the SQL string, no database round trip), ops/s, best of 3 processes, higher is better.
7575

7676
| Scenario | @coderbuzz/sql | Kysely | Factor vs Kysely | Drizzle ORM | Factor vs Drizzle |
7777
|---|---|---|---|---|---|
78-
| SELECT simple | **1,032,086 ops/s** | 460,788 | **2.2x** | 46,083 | **22.4x** |
79-
| SELECT JOIN (2 tables) | **539,870 ops/s** | 264,268 | **2.0x** | 19,127 | **28.2x** |
80-
| INSERT single row | **1,729,852 ops/s** | 292,097 | **5.9x** | 52,251 | **33.1x** |
81-
| INSERT batch 100 rows | **70,248 ops/s** | 10,878 | **6.5x** | 842 | **83.4x** |
82-
| CTE (WITH clause) | **366,525 ops/s** | 160,544 | **2.3x** | 41,805 | **8.8x** |
83-
| 10 nested WHERE conditions | **446,201 ops/s** | 106,321 | **4.2x** | 19,358 | **23.0x** |
84-
85-
`@coderbuzz/sql` is 2.0-6.5x faster than Kysely and 8.8-83x faster than Drizzle ORM on every query type in the suite. The lead over Kysely is largest on inserts (5.9x single row, 6.5x batch) and many conditions (4.2x), smallest on JOIN and CTE (2.0-2.3x): `@coderbuzz/sql` compiles straight to a string, Kysely builds and walks an AST, Drizzle adds its ORM layer.
78+
| SELECT simple | **804,807 ops/s** | 319,742 | **2.5x** | 29,699 | **27.1x** |
79+
| SELECT JOIN (2 tables) | **340,039 ops/s** | 186,871 | **1.8x** | 12,669 | **26.8x** |
80+
| INSERT single row | **1,119,447 ops/s** | 190,416 | **5.9x** | 33,574 | **33.3x** |
81+
| INSERT batch 100 rows | **46,379 ops/s** | 7,077 | **6.6x** | 497 | **93.3x** |
82+
| CTE (WITH clause) | **217,074 ops/s** | 102,676 | **2.1x** | 23,107 | **9.4x** |
83+
| 10 nested WHERE conditions | **307,419 ops/s** | 70,826 | **4.3x** | 10,873 | **28.3x** |
84+
85+
`@coderbuzz/sql` is 1.8-6.6x faster than Kysely and 9.4-93x faster than Drizzle ORM on every query type in the suite. The lead over Kysely is largest on inserts (5.9x single row, 6.6x batch) and many conditions (4.3x), smallest on JOIN and CTE (1.8-2.1x): `@coderbuzz/sql` compiles straight to a string, Kysely builds and walks an AST, Drizzle adds its ORM layer.
8686

8787
> Numbers move with the machine; compare them only within one run. The source of truth is `https://raw.githubusercontent.com/coderbuzz/benchmarks/main/results/latest.json`.
8888

0 commit comments

Comments
 (0)