JSON v. JSONH v. msgpack

JavaScript performance comparison

Revision 8 of this test case created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/prototype/1/prototype.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/yui/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<script src="//raw.github.com/uupaa/msgpack.js/master/msgpack.js"></script>
<script>
  var StaticJSONP = {
      notify: function(uid, dummyData) {
        window.dummyData = dummyData;
      }
    };
  "JSON" in this || document.write('<','script src="http://www.3site.eu/examples/json.hpack/test/json2.js">','<','/script>');
  document.write([
      '<','script src="http://www.3site.eu/examples/json.hpack/test/dummy.js">','<','/script>',
      '<','script src="http://www.3site.eu/examples/json.hpack/test/JSONH.js">','<','/script>',
      '<','script src="http://www.3site.eu/examples/json.hpack/test/JSONHF.js">','<','/script>'
  ].join(""));
</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
JSON.stringify
window.JSONresult = JSON.stringify(dummyData);
pending…
JSONH.stringify
window.JSONHresult = JSONH.stringify(dummyData);
pending…
msgpack.pack
window.msgpackresult = msgpack.pack(dummyData);
pending…
JSON.parse
window.JSONparsed = JSON.parse(JSONresult);
pending…
JSONH.parse
window.JSONHparsed = JSONH.parse(JSONHresult);
pending…
msgpack.unpack
window.msgpackparsed = msgpack.unpack(msgpackresult);
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