Msgpack-js vs JSON vs CBOR

JavaScript performance comparison

Revision 37 of this test case created by

Preparation code

<script src=""></script>
<script src=""></script>
Benchmark.prototype.setup = function() {
  var stringData = {
    "glossary": {
      "title": "example glossary",
      "GlossDiv": {
        "title": "S",
        "GlossList": {
          "GlossEntry": {
            "ID": "SGML",
            "SortAs": "SGML",
            "GlossTerm": "Standard Generalized Markup Language",
            "Acronym": "SGML",
            "Abbrev": "ISO 8879:1986",
            "GlossDef": {
              "para": "A meta-markup language, used to create markup languages such as DocBook.",
              "GlossSeeAlso": ["GML", "XML"]
            "GlossSee": "markup"
  var numberData = [
    [1, 2, 3, 4, -1, true, null],
    [3, 6, 5, 4, 1, false, 7],
    [3, 2, 8, 1, 0, true, 0],
    [10, 11, 12, 13, 14, false, true],
    [15, 16, 17, 18, 19, true, null],
    [20, 21, 22, 23, 24, false, 7],
    [25, 26, 27, 28, 29, true, 0],
    100, 200, 300, [
      [1, 0, 0, 0, 0],
      [0, 1, 0, 0, 0],
      [0, 0, 1, 0, 0],
      [0, 0, 0, 1, 0],
      [0, 0, 0, 0, 1]


Preparation code output

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
JSON strings
var result = JSON.parse(JSON.stringify(stringData));
JSON numbers
var result = JSON.parse(JSON.stringify(numberData));
MsgPack strings
var result = msgpack.decode(msgpack.encode(stringData));
MsgPack numbers
var result = msgpack.decode(msgpack.encode(numberData));
CBOR strings
var result = CBOR.decode(CBOR.encode(stringData));
CBOR numbers
var result = CBOR.decode(CBOR.encode(numberData));

Compare results of other browsers


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

1 Comment

ninest123 commented :

mt0507 ralph lauren outlet online rolex watches christian louboutin outlet coach outlet store nmd shoes nike shoes coach factory outlet coach outlet online adidas yeezy boost louis vuitton michael kors outlet canada goose uk kate spade outlet coach factorty outlet polo outlet louis vuitton handbags kate spade outlet michael kors outlet coach factory outlet canada goose sale cheap mlb jerseys ralph lauren canada goose outlet coach factory outlet jordan shoes coach outlet cheap jordan shoes adidas burberry outlet fitflops pandora jewelry canada goose jackets toms outlet canada goose outlet jordan shoes adidas shoes michael kors outlet hermes handbags michael kors outlet canada ray ban sunglasses discount pandora charms nike shoes jordan shoes canada goose jackets kate spade outlet adidas shoes birkenstock sandals moncler jackets fred perry polo air max 2018 coach factory outlet air max 2019 nike shoes ugg boots ralph lauren sale pandora charms nike outlet pandora outlet asics shoes kate spade outlet store tory burch outlet online oakley sunglasses sale oakley sunglasses nike air max kobe bryant shoes coach outlet coach outlet online canada goose jackets nike store moncler outlet salvatore ferragamo shoes coach outlet canada goose polo ralph lauren outlet canada goose uk coach outlet ugg outlet christian louboutin outlet oakley sunglasses pandora charms canada goose sale nike outlet ugg boots canada goose outlet hermens bags philipp plein outlet birkenstock sandals mbt shoes nmd adidas cheap nike air max new balance outlet cheap jordans kate spade air jordans supreme clothing abercrombie and fitch rolex watches timberland boots coach outlet birkenstocks pandora charms cheap mlb jerseys moncler outlet adidas yeezy kate spade outlet store pandora charms sale clearance canada goose sale michael kors pandora charms michael kors outlet canada ugg boots on sale cheap jordans for sale polo outlet timberland boots michael kors outlet birkenstock shoes pandora charms sale clearance canada goose outlet canada goose red bottoms jordan retro nike outlet store pandora jewelry pandora outlet adidas yeezy fitflops sale jordans polo ralph lauren outlet online new balance shoes fred perry burberry outlet polo ralph lauren outlet online gucci outlet adidas outlet polo ralph lauren outlet online kate spade moncler jackets mont blanc pens louboutin shoes adidas yeezy louis vuitton outlet nike shoes for men ugg outlet cheap nfl jerseys canada goose outlet coach outlet birkenstock sandals coach outlet pandora charms tods outlet pandora jewelry official site nike outlet coach factory outlet online canada goose uk air max 90 birkenstock shoes supreme clothing timberland outlet coach factory outlet adidas nmd coach outlet store coach outlet longchamp outlet nike air max pandora jewelry coach outlet michael kors outlet ugg outlet uggs pandora charms oakley sunglasses kate spade outlet coach outlet pandora kate spade outlet coach factory outlet kate spade handbags adidas superstar burberry outlet store north face outlet birkenstock michael kors outlet canada ugg boots on sale fitflops air max 97 mulberry handbags michael kors outlet fitflops air max 97 cheap nfl jerseys air max 2017 coach canada adidas yeezy moncler jackets nfl jerseys wholesale oakley sunglasses michael kors outlet online longchamp outlet online cheap mlb jerseys china tory burch outlet pandora outlet philipp plein shirt coach outlet air jordan shoes canada goose outlet michael kors outlet coach outlet canada abercrombie coach outlet store uggs canada michael kors outlet clearance moncler outlet canada goose jackets hermes birkin polo ralph lauren outlet online cheap jordans michael kors adidas nmd yeezy 350 boost cheap uggs jordans cheap ray ban sunglasses mlb jerseys ray ban sunglasses moncler jackets outlet birkenstock sandals polo ralph lauren outlet oakley sunglasses christian louboutin ralph lauren ralph lauren outlet hollister clothing ralph lauren outlet cheap ray bans christian louboutin outlet pandora charms sale louboutin shoes moncler outlet ralph lauren sale clearance canada goose outlet coach outlet store cheap oakley sunglasses canada goose outlet jordan shoes coach factory outlet coach outlet ugg boots kate spade kate spade handbags birkenstock outlet air max 2018 polo outlet store yeezy boost prada handbags adidas yeezy boost pandora jewelry valentino shoes ferragamo outlet cheap ray ban sunglasses moncler outlet ralph lauren outlet nike shoes mbt shoes ecco shoes coach outlet nike air max fitflops sale clearance ralph lauren puma shoes pandora jewelry outlet pandora store pandora jewelry valentino shoes outlet coach factory outlet moncler jackets oakley sunglasses nike outlet longchamp outlet coach outlet store online prada outlet adidas nmd coach factory outlet coach outlet store coach outlet store online clearances louis vuitton outlet online supreme clothing jordan shoes michael kors outlet nike outlet online coach outlet pandora jewelry north face jackets vans store red bottoms shoes polo ralph lauren outlet michael kors outlet supreme new york fitflops adidas yeezy louis vuitton outlet store michael kors outlet clearance cheap oakley sunglasses ralph lauren sale clearance coach outlet reebok shoes cheap jordans supra shoes michael kors factory outlet nike free 4.0 cheap jordans free shipping toms outlet ralph lauren sale clearance gucci handbags outlet timberland outlet ralph lauren outlet converse outlet store coach outlet canada goose uk north face jackets cheap jordans coach factory outlet louis vuitton outlet canada goose jackets pandora jewelry outlet michael kors handbags nba jerseys harden vol 1 adidas nmd shoes mcm handbags tiffany and co nike outlet online louis vuitton outlet online coach factory outlet online birkenstock outlet ralph lauren uk tory burch outlet store mbt canada goose jackets canada goose jackets moncler coats skechers shoes ralph lauren uk ultra boost jordan retro 11 michael kors outlet clearance moncler outlet red bottom shoes ugg outlet nike air max outlet pandora charms canada goose fitflops timberland boots outlet mulberry outlet canada goose uk michael kors outlet canada goose mont blanc coach outlet store jordan shoes coach outlet burberry outlet mulberry uk coach outlet coach outlet store nike huarache tory burch outlet adidas nmd nike shoes oakley sunglasses timberland boots uggs kate spade outlet store adidas campus hermes handbags ugg australia ray ban sunglasses discount toms shoes ray ban sunglasses nike free run oakley sunglasses christian louboutin shoes ecco shoes for men yeezy boost mcm outlet oakley sunglasses outlet ray ban sunglasses adidas shoes louis vuitton moncler jackets canada goose outlet adidas yeezy boost pandora jewelry adidas shoes canada goose outlet canada goose jackets uk kevin durant shoes michael kors outlet online canada goose outlet nike zoom michael kors outlet michael kors outlet yeezy boost 350 kate spade bags tory burch outlet coach factory outlet discount oakley sunglasses ray ban sunglasses michael kors outlet air jordan shoes michael kors outlet polo ralph lauren outlet adidas outlet converse shoes coach outlet michael kors handbags ferragamo shoes tiffany and co vans shoes hermes bags hermes outlet ralph lauren outlet cheap oakley sunglasses polo ralph lauren salvatore ferragamo pandora outlet cheap nba jerseys cheap oakley sunglasses coach outlet online yeezy boost fitflops sale clearance pandora jewelry replica watches adidas superstar adidas shoes supra shoes tiffany outlet yeezy boost kate spade outlet store longchamp handbags adidas outlet kate spade handbag valentino shoes coach outlet michael kors outlet clearance adidas originals yeezy boost polo ralph lauren outlet pandora jewelry mulberry bags hermes handbags coach factorty outlet moncler oakey sunglasses uggs outlet michael kors outlet clearance pandora jewelry official site michael kors outlet online air jordans gucci handbags kobe shoes coach outlet ugg outlet christian louboutin fitflops sale clearance uggs pandora charms uk uggs outlet kate spade outlet louboutin shoes ralph lauren outlet fitflops sale cheap jordans ray ban sunglasses mt0507