Skip to content

Commit 0248707

Browse files
authored
docs(readme): update benchmarks (#155)
1 parent 0224b66 commit 0248707

File tree

1 file changed

+35
-17
lines changed

1 file changed

+35
-17
lines changed

README.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,39 +88,57 @@ Scans a given object for prototype properties where:
8888

8989
## Benchmarks
9090

91-
Machine: 2,7 GHz Quad-Core Intel Core i7
91+
Machine: 2.4 Ghz 14-core Intel Core i7-13650HX
9292

9393
```
94-
v14.8.0
95-
94+
95+
> node valid.js
96+
97+
JSON.parse x 1,866,229 ops/sec ±1.91% (86 runs sampled)
98+
JSON.parse proto x 1,237,402 ops/sec ±1.32% (95 runs sampled)
99+
secure-json-parse parse x 1,693,973 ops/sec ±0.99% (94 runs sampled)
100+
secure-json-parse parse proto x 1,864,139 ops/sec ±0.86% (95 runs sampled)
101+
secure-json-parse safeParse x 1,703,452 ops/sec ±0.46% (91 runs sampled)
102+
secure-json-parse safeParse proto x 1,116,725 ops/sec ±0.62% (94 runs sampled)
103+
JSON.parse reviver x 295,223 ops/sec ±0.39% (100 runs sampled)
104+
Fastest is secure-json-parse parse proto
105+
106+
96107
> node ignore.js
97108
98-
JSON.parse x 679,376 ops/sec ±1.15% (84 runs sampled)
99-
secure-json-parse x 649,605 ops/sec ±0.58% (87 runs sampled)
100-
reviver x 244,414 ops/sec ±1.05% (88 runs sampled)
109+
JSON.parse x 1,227,994 ops/sec ±1.05% (90 runs sampled)
110+
secure-json-parse parse x 1,184,011 ops/sec ±0.66% (95 runs sampled)
111+
secure-json-parse safeParse x 1,123,041 ops/sec ±1.12% (92 runs sampled)
112+
reviver x 196,637 ops/sec ±0.50% (99 runs sampled)
101113
Fastest is JSON.parse
102114
115+
103116
> node no__proto__.js
104117
105-
JSON.parse x 652,190 ops/sec ±0.67% (86 runs sampled)
106-
secure-json-parse x 589,785 ops/sec ±1.01% (88 runs sampled)
107-
reviver x 218,075 ops/sec ±1.58% (87 runs sampled)
118+
JSON.parse x 1,183,590 ops/sec ±0.43% (93 runs sampled)
119+
secure-json-parse parse x 1,053,759 ops/sec ±0.76% (97 runs sampled)
120+
secure-json-parse safeParse x 1,066,295 ops/sec ±0.60% (95 runs sampled)
121+
reviver x 186,683 ops/sec ±0.61% (94 runs sampled)
108122
Fastest is JSON.parse
109123
124+
110125
> node remove.js
111126
112-
JSON.parse x 683,527 ops/sec ±0.62% (88 runs sampled)
113-
secure-json-parse x 316,926 ops/sec ±0.63% (87 runs sampled)
114-
reviver x 214,167 ops/sec ±0.63% (86 runs sampled)
127+
JSON.parse x 1,229,886 ops/sec ±1.43% (90 runs sampled)
128+
secure-json-parse parse x 506,756 ops/sec ±0.39% (95 runs sampled)
129+
secure-json-parse safeParse x 1,136,082 ops/sec ±0.84% (97 runs sampled)
130+
reviver x 185,631 ops/sec ±1.09% (96 runs sampled)
115131
Fastest is JSON.parse
116132
133+
117134
> node throw.js
118135
119-
JSON.parse x 682,548 ops/sec ±0.60% (88 runs sampled)
120-
JSON.parse error x 170,716 ops/sec ±0.93% (87 runs sampled)
121-
secure-json-parse x 104,483 ops/sec ±0.62% (87 runs sampled)
122-
reviver x 114,197 ops/sec ±0.63% (87 runs sampled)
123-
Fastest is JSON.parse
136+
JSON.parse valid x 1,252,559 ops/sec ±1.04% (94 runs sampled)
137+
JSON.parse error x 133,036 ops/sec ±1.35% (73 runs sampled)
138+
secure-json-parse parse x 305,759 ops/sec ±0.80% (93 runs sampled)
139+
secure-json-parse safeParse x 351,419 ops/sec ±0.85% (97 runs sampled)
140+
reviver x 123,542 ops/sec ±0.46% (77 runs sampled)
141+
Fastest is JSON.parse valid
124142
```
125143

126144
## Acknowledgments

0 commit comments

Comments
 (0)