Skip to content

Commit fd0244c

Browse files
authored
Merge branch 'main' into release-please--branches--main--components--sql-escaper
2 parents 78ec714 + 4082402 commit fd0244c

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![GitHub Workflow Status (Bun)](https://img.shields.io/github/actions/workflow/status/wellwelwel/sql-escaper/ci_bun.yml?event=push&label=&branch=main&logo=bun&logoColor=ffffff&color=f368e0)](https://github.com/wellwelwel/sql-escaper/actions/workflows/ci_bun.yml?query=branch%3Amain)
88
[![GitHub Workflow Status (Deno)](https://img.shields.io/github/actions/workflow/status/wellwelwel/sql-escaper/ci_deno.yml?event=push&label=&branch=main&logo=deno&logoColor=ffffff&color=079992)](https://github.com/wellwelwel/sql-escaper/actions/workflows/ci_deno.yml?query=branch%3Amain)
99

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**).
1111

1212
</div>
1313

@@ -312,14 +312,14 @@ import type { Raw, SqlValue, Timezone } from 'sql-escaper';
312312

313313
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):
314314

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** |
323323

324324
- See detailed results and how the benchmarks are run in the [**benchmark**](https://github.com/wellwelwel/sql-escaper/tree/main/benchmark) directory.
325325

0 commit comments

Comments
 (0)