bson vs msgpack vs json (v6)

Revision 6 of this benchmark created by manvalls 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;
console.log(BSON.serialize(obj));
ready
json
console.log(JSON.stringify(obj));
ready
msgpack
console.log(msgpack.pack(obj));
ready

Revisions

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