Skip to content

Commit b5527e7

Browse files
committed
docs: prefer realistic benchmark results
1 parent 60a35d2 commit b5527e7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- **TypeScript** by default.
1717
- Support for `Uint8Array` and `BigInt`.
1818
- Support for both **CJS** and **ESM** exports.
19-
- Up to [**~50% faster**](#performance) compared to **sqlstring**.
19+
- Up to [**~40% faster**](#performance) compared to **sqlstring**.
2020
- Distinguishes when a keyword is used as value.
2121
- Distinguishes when a column has a keyword name.
2222
- Distinguishes between multiple clauses/keywords in the same query.
@@ -353,12 +353,12 @@ Each benchmark formats `10,000` queries using `format` with `100` mixed values (
353353

354354
| Benchmark | sqlstring | SQL Escaper | Difference |
355355
| ---------------------------------------- | --------: | ----------: | ---------------: |
356-
| Select 100 values | 264.6 ms | 170.3 ms | **1.55x faster** |
357-
| Insert 100 values | 266.0 ms | 189.2 ms | **1.41x faster** |
358-
| SET with 100 values | 273.9 ms | 196.1 ms | **1.40x faster** |
359-
| SET with 100 objects | 360.7 ms | 249.3 ms | **1.45x faster** |
360-
| ON DUPLICATE KEY UPDATE with 100 values | 515.7 ms | 375.9 ms | **1.37x faster** |
361-
| ON DUPLICATE KEY UPDATE with 100 objects | 598.4 ms | 441.5 ms | **1.36x faster** |
356+
| Select 100 values | 248.8 ms | 178.7 ms | **1.39x faster** |
357+
| Insert 100 values | 247.5 ms | 196.2 ms | **1.26x faster** |
358+
| SET with 100 values | 257.5 ms | 205.2 ms | **1.26x faster** |
359+
| SET with 100 objects | 348.3 ms | 250.5 ms | **1.39x faster** |
360+
| ON DUPLICATE KEY UPDATE with 100 values | 466.2 ms | 394.6 ms | **1.18x faster** |
361+
| ON DUPLICATE KEY UPDATE with 100 objects | 558.2 ms | 433.9 ms | **1.29x faster** |
362362

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

0 commit comments

Comments
 (0)