Skip to content

Commit dce0045

Browse files
committed
update benchmark results in README.md
1 parent b8e4de5 commit dce0045

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,17 @@ NodeJS v10 is required, but NodeJS v12 or later is recommended because it includ
193193

194194
## Benchmark
195195

196-
Benchmark on NodeJS/v12.1.0
196+
Benchmark on NodeJS/v12.3.1
197197

198198
operation | op | ms | op/s
199199
----------------------------------------------------------------- | ------: | ----: | ------:
200-
buf = Buffer.from(JSON.stringify(obj)); | 493600 | 5000 | 98720
201-
buf = JSON.stringify(obj); | 959600 | 5000 | 191920
202-
obj = JSON.parse(buf); | 346100 | 5000 | 69220
203-
buf = require("msgpack-lite").encode(obj); | 358300 | 5000 | 71660
204-
obj = require("msgpack-lite").decode(buf); | 270400 | 5000 | 54080
205-
buf = require("@msgpack/msgpack").encode(obj); | 594300 | 5000 | 118860
206-
obj = require("@msgpack/msgpack").decode(buf); | 343100 | 5000 | 68620
200+
buf = Buffer.from(JSON.stringify(obj)); | 497600 | 5000 | 99520
201+
buf = JSON.stringify(obj); | 969500 | 5000 | 193900
202+
obj = JSON.parse(buf); | 345300 | 5000 | 69060
203+
buf = require("msgpack-lite").encode(obj); | 369100 | 5000 | 73820
204+
obj = require("msgpack-lite").decode(buf); | 278900 | 5000 | 55780
205+
buf = require("@msgpack/msgpack").encode(obj); | 556900 | 5000 | 111380
206+
obj = require("@msgpack/msgpack").decode(buf); | 502200 | 5000 | 100440
207207

208208
Note that `Buffer.from()` for `JSON.stringify()` is added to emulate I/O where a JavaScript string must be converted into a byte array encoded in UTF-8, whereas MessagePack's `encode()` returns a byte array.
209209

0 commit comments

Comments
 (0)