|
7 | 7 | [](https://github.com/wellwelwel/sql-escaper/actions/workflows/ci_bun.yml?query=branch%3Amain) |
8 | 8 | [](https://github.com/wellwelwel/sql-escaper/actions/workflows/ci_deno.yml?query=branch%3Amain) |
9 | 9 |
|
10 | | -🛡️ Up to [**2x faster**](#performance) SQL escape and format for **JavaScript** (**Node.js**, **Bun**, and **Deno**). |
| 10 | +🛡️ Up to [**~40% faster**](#performance) SQL escape and format for **JavaScript** (**Node.js**, **Bun**, and **Deno**). |
11 | 11 |
|
12 | 12 | </div> |
13 | 13 |
|
@@ -312,14 +312,14 @@ import type { Raw, SqlValue, Timezone } from 'sql-escaper'; |
312 | 312 |
|
313 | 313 | Each benchmark formats `10,000` queries using `format` with `100` mixed values (numbers, strings, `null`, and dates), comparing **SQL Escaper** against the original [**sqlstring**](https://github.com/mysqljs/sqlstring) through [**hyperfine**](https://github.com/sharkdp/hyperfine): |
314 | 314 |
|
315 | | -| Benchmark | sqlstring | SQL Escaper | Difference | |
316 | | -| ---------------------------------------- | ---------: | ----------: | ---------------: | |
317 | | -| Select 100 values | 450.3 ms | 178.1 ms | **2.53x faster** | |
318 | | -| Insert 100 values | 453.2 ms | 198.0 ms | **2.29x faster** | |
319 | | -| SET with 100 values | 471.3 ms | 213.8 ms | **2.20x faster** | |
320 | | -| SET with 100 objects | 656.9 ms | 249.6 ms | **2.63x faster** | |
321 | | -| ON DUPLICATE KEY UPDATE with 100 values | 873.2 ms | 397.8 ms | **2.20x faster** | |
322 | | -| ON DUPLICATE KEY UPDATE with 100 objects | 1,076.0 ms | 442.6 ms | **2.43x faster** | |
| 315 | +| Benchmark | sqlstring | SQL Escaper | Difference | |
| 316 | +| ---------------------------------------- | --------: | ----------: | ---------------: | |
| 317 | +| Select 100 values | 248.8 ms | 178.7 ms | **1.39x faster** | |
| 318 | +| Insert 100 values | 247.5 ms | 196.2 ms | **1.26x faster** | |
| 319 | +| SET with 100 values | 257.5 ms | 205.2 ms | **1.26x faster** | |
| 320 | +| SET with 100 objects | 348.3 ms | 250.5 ms | **1.39x faster** | |
| 321 | +| ON DUPLICATE KEY UPDATE with 100 values | 466.2 ms | 394.6 ms | **1.18x faster** | |
| 322 | +| ON DUPLICATE KEY UPDATE with 100 objects | 558.2 ms | 433.9 ms | **1.29x faster** | |
323 | 323 |
|
324 | 324 | - See detailed results and how the benchmarks are run in the [**benchmark**](https://github.com/wellwelwel/sql-escaper/tree/main/benchmark) directory. |
325 | 325 |
|
|
0 commit comments