Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

The results in the readme are misleading #66

@bobef

Description

@bobef

I just run the benchmark on node 4.x here and msgpack is way slower than JSON.

↪ ./run_tests test/benchmark/benchmark.js

benchmark.js

msgpack.pack: 7171ms, JSON.stringify: 2373ms
ratio of JSON.stringify/msgpack.pack: 0.33091619021057034
✔ benchmark - JSON.stringify faster than msgpack.pack with array of 1m objects

msgpack.pack: 8614ms, JSON.stringify: 3252ms
ratio of msgpack.pack/JSON.stringify: 2.648831488314883
✔ benchmark - JSON.stringify faster than msgpack.pack over 1m calls

msgpack.unpack: 4959ms, JSON.parse: 1522ms
ratio of JSON.parse/msgpack.unpack: 3.2582128777923787
✔ benchmark - JSON.parse faster than msgpack.unpack over 1m calls

msgpack pack:   6622 ms
msgpack unpack: 9435 ms
json    pack:   2983 ms
json    unpack: 3738 ms

msgpack pack:   13744 ms
msgpack unpack: 28709 ms
json    pack:   3352 ms
json    unpack: 3732 ms

msgpack pack:   11742 ms
msgpack unpack: 24797 ms
json    pack:   3187 ms
json    unpack: 3829 ms

✔ benchmark - output above is from three runs on a 1m element array of objects

msgpack pack:   9234 ms
msgpack unpack: 6004 ms
json    pack:   3019 ms
json    unpack: 1953 ms

msgpack pack:   9205 ms
msgpack unpack: 5706 ms
json    pack:   2491 ms
json    unpack: 1536 ms

msgpack pack:   8342 ms
msgpack unpack: 5194 ms
json    pack:   2471 ms
json    unpack: 1541 ms

✔ benchmark - output above is from three runs of 1m individual calls

OK: 5 assertions (217708ms)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions