bson vs msgpack vs json (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script src="https://rawgithub.com/msgpack/msgpack-javascript/master/msgpack.js"></script>
<script src="https://rawgithub.com/mongodb/js-bson/master/browser_build/bson.js"></script>

Setup

var obj = {a: 'testing', b: {a: 3, c: 4, d: 'testing'}};

Test runner

Ready to run.

Testing in
TestOps/sec
bson
var BSON = bson().BSON;
BSON.serialize(obj);
ready
json
JSON.stringify(obj);
ready
msgpack
msgpack.pack(obj);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.