Skip to content

Commit 5c72f91

Browse files
committed
docs: update benchmark results
1 parent 0da77c6 commit 5c72f91

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -314,21 +314,21 @@ import type { Raw, SqlValue, Timezone } from 'sql-escaper';
314314

315315
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):
316316

317-
| Benchmark | sqlstring | SQL Escaper | Difference |
318-
| ---------------------------------------- | --------: | ----------: | ---------------: |
319-
| Select 100 values | 313.0 ms | 193.7 ms | **1.62x faster** |
320-
| Insert 100 values | 311.9 ms | 194.1 ms | **1.61x faster** |
321-
| SET with 100 values | 317.6 ms | 191.0 ms | **1.66x faster** |
322-
| SET with 100 objects | 448.9 ms | 224.2 ms | **2.00x faster** |
323-
| ON DUPLICATE KEY UPDATE with 100 values | 568.8 ms | 330.3 ms | **1.72x faster** |
324-
| ON DUPLICATE KEY UPDATE with 100 objects | 690.3 ms | 361.1 ms | **1.91x faster** |
317+
| Benchmark | sqlstring | SQL Escaper | Difference |
318+
| ---------------------------------------- | ---------: | ----------: | ---------------: |
319+
| Select 100 values | 460.9 ms | 242.2 ms | **1.90x faster** |
320+
| Insert 100 values | 468.6 ms | 242.5 ms | **1.93x faster** |
321+
| SET with 100 values | 484.2 ms | 257.0 ms | **1.88x faster** |
322+
| SET with 100 objects | 671.6 ms | 283.2 ms | **2.37x faster** |
323+
| ON DUPLICATE KEY UPDATE with 100 values | 894.0 ms | 459.8 ms | **1.94x faster** |
324+
| ON DUPLICATE KEY UPDATE with 100 objects | 1,092.0 ms | 485.7 ms | **2.25x faster** |
325325

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

328328
> [!NOTE]
329329
>
330-
> Benchmarks ran on an **Apple M2 Ultra** with **64 GB RAM** using **Node.js v25.5.0**.
331-
> Results may vary depending on hardware and runtime version.
330+
> Benchmarks ran on [**GitHub Actions**](https://github.com/wellwelwel/sql-escaper/blob/main/.github/workflows/ci_benchmark.yml) (`ubuntu-latest`) using **Node.js LTS**.
331+
> Results may vary depending on runner hardware and runtime version.
332332
333333
---
334334

0 commit comments

Comments
 (0)