JSON vs MessagePack

JavaScript performance comparison

Revision 2 of this test case created

Info

This test simply compares actual serializing and deserializing

Preparation code

<script src="https://raw.github.com/msgpack/msgpack-javascript/master/msgpack.js"></script>
<script>
Benchmark.prototype.setup = function() {
    var testData = {
        "smallClass": [
            {
                "smallClassCode": "XXXXXXXXXX",
                "smallClassName": "東京あああああああああああああああ",
                "vacancy": [
                    {
                        "201312": {
                            "01": 1000,
                            "02": 1000
                        }
                    }
                ]
            }
        ]
    };
};
</script>

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
var data = JSON.stringify(testData);
JSON.parse(data);
pending…
MessagePack
var data = msgpack.pack(testData);
msgpack.unpack(data);
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