msgpack vs bjson vs json

JavaScript performance comparison

Test case created by deStrO

Info

Performance test beetween bjson and jsperf

Preparation code

<script src="http://jonasfj.github.com/BJSON.coffee/src/encoding.js">
</script>
<script src="http://jonasfj.github.com/BJSON.coffee/bin/BJSON.js">
</script>
<script src="https://raw.github.com/msgpack/msgpack-javascript/master/msgpack.js">
</script>
<script>
Benchmark.prototype.setup = function() {
    var objectTest = {
      'abcdef': 1,
      'qqq': 13,
      '19': [1, 2, 3, 4]
    };
};
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
BJSON
BJSON.parse(BJSON.serialize(objectTest));
pending…
msgpack
msgpack.unpack(msgpack.pack(objectTest))
pending…
JSON
JSON.parse(JSON.stringify(objectTest));
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment