Skip to content

Commit d89d1ed

Browse files
committed
docs: update benchmarks on readme
1 parent 2da2a5e commit d89d1ed

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ console.log(qs)
3434

3535
### Benchmark
3636

37+
- Parsing a query-string
38+
3739
```
38-
> fast-querystring@0.1.0 benchmark
39-
> node test/benchmark.mjs
40+
> node benchmark/parse.mjs
4041
4142
╔═════════════════════════════════════════╤═════════╤═══════════════════╤═══════════╤══════════════════════════╗
4243
║ Slower tests │ Samples │ Result │ Tolerance │ Difference with previous ║
@@ -52,3 +53,22 @@ console.log(qs)
5253
║ fast-querystring │ 10000 │ 1492040.49 op/sec │ ± 2.77 % │ + 16.93 % ║
5354
╚═════════════════════════════════════════╧═════════╧═══════════════════╧═══════════╧══════════════════════════╝
5455
```
56+
57+
- Stringify a query-string
58+
59+
```
60+
> node benchmark/stringify.mjs
61+
62+
╔══════════════════╤═════════╤═══════════════════╤═══════════╤══════════════════════════╗
63+
║ Slower tests │ Samples │ Result │ Tolerance │ Difference with previous ║
64+
╟──────────────────┼─────────┼───────────────────┼───────────┼──────────────────────────╢
65+
║ query-string │ 10000 │ 295574.51 op/sec │ ± 1.18 % │ ║
66+
║ qs │ 10000 │ 349191.83 op/sec │ ± 1.42 % │ + 18.14 % ║
67+
║ URLSearchParams │ 1000 │ 605856.45 op/sec │ ± 0.77 % │ + 73.50 % ║
68+
║ node:querystring │ 10000 │ 1829015.91 op/sec │ ± 5.07 % │ + 201.89 % ║
69+
╟──────────────────┼─────────┼───────────────────┼───────────┼──────────────────────────╢
70+
║ Fastest test │ Samples │ Result │ Tolerance │ Difference with previous ║
71+
╟──────────────────┼─────────┼───────────────────┼───────────┼──────────────────────────╢
72+
║ fast-querystring │ 10000 │ 1976753.77 op/sec │ ± 3.43 % │ + 8.08 % ║
73+
╚══════════════════╧═════════╧═══════════════════╧═══════════╧══════════════════════════╝
74+
```

0 commit comments

Comments
 (0)