JSON v. JSONH v. msgpack (v14)

Revision 14 of this benchmark created by Vlad Mysla on


Preparation HTML

<script src="https://cdn.jsdelivr.net/msgpack/1.05/msgpack.base.js"></script>
<script>
var json = [{
          PartnerID               : 1                                
        , APIKey                  : '4f92cd9422044bd6b68f20994cad8bc8'
        , SubsystemId             : 0  
 
        , HttpVerbTypeID          : 1
        , HttpStatus              : 200
 
        , RequestDatetime         : '2014-05-15 19:41:27.016'
 
        , PageURL                 : 'http://www.justanswer.com/law/8g93i-options-someone-used-sealed-court-documents.html'
        , ReferralURL             : 'http://www.justanswer.com/law/'
 
        , RequestGUID             : 'd3144881-8c96-4bb5-b055-68b560fb9436'
        , OriginatingRequestGUID  : ''
  
        , RouteAction             : 'page/unknown'
        , RouteActionGUID         : '214a4f03-95b7-4895-9140-6eb55741cc24'
 
        , VisitorGUID             : '3e7c3ea7-2a9a-4a51-d760-8f72a8714730'
        , ApiEncodedUserID        : 'd2bc0a1283334374b6da7be4fe31f7ab'
 
        , CookiesEnabled          : true
     }];

  var StaticJSONP = {
      notify: function(uid, dummyData) {
        window.dummyData = json;
      }
    };
  "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>

Test runner

Ready to run.

Testing in
TestOps/sec
JSON.stringify
window.JSONresult = JSON.stringify(dummyData);
ready
JSONH.stringify
window.JSONHresult = JSONH.stringify(dummyData);
ready
msgpack.pack
window.msgpackresult = msgpack.pack(dummyData);
ready
JSON.parse
window.JSONparsed = JSON.parse(JSONresult);
ready
JSONH.parse
window.JSONHparsed = JSONH.parse(JSONHresult);
ready
msgpack.unpack
window.msgpackparsed = msgpack.unpack(msgpackresult);
ready

Revisions

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