jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
Comparing the speed of msgpack-js using typed arrays against JSON.parse and JSON.stringify
<script src="https://raw.github.com/msgpack/msgpack-javascript/master/msgpack.js"></script>
var stringData =
[
{"principal_code":"FN","product_code":"1151000","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":209},
{"principal_code":"FN","product_code":"1111781","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":2489},
{"principal_code":"FN","product_code":"1111545","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":624},
{"principal_code":"FN","product_code":"1111503","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":1896},
{"principal_code":"FN","product_code":"1111844","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":26838},
{"principal_code":"FN","product_code":"1111502","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":1092},
{"principal_code":"FN","product_code":"1151003","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":183},
{"principal_code":"FN","product_code":"1111528","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":272},
{"principal_code":"FN","product_code":"1151002","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":1296},
{"principal_code":"FN","product_code":"1151001","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":597},
{"principal_code":"FN","product_code":"1111830","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":4316},
{"principal_code":"FN","product_code":"1111536","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":1605},
{"principal_code":"FN","product_code":"1111826","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":9432},
{"principal_code":"FN","product_code":"1111516","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":6022},
{"principal_code":"FN","product_code":"1111823","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":60},
{"principal_code":"FN","product_code":"1111804","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":14112},
{"principal_code":"FN","product_code":"1111824","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":57794},
{"principal_code":"FN","product_code":"1111556","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":85},
{"principal_code":"FN","product_code":"1111517","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":2652},
{"principal_code":"FN","product_code":"1151007","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":1277},
{"principal_code":"FN","product_code":"1151005","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":490},
{"principal_code":"FN","product_code":"1151006","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":1819},
{"principal_code":"FN","product_code":"5000004","product_type":"Point of sales","area_type":"Hold Area Type","location_label":"PL","attribute":null,"quantity":438},
{"principal_code":"FN","product_code":"1111531","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":131},
{"principal_code":"FN","product_code":"1151009","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":78},
{"principal_code":"FN","product_code":"1111518","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":36},
{"principal_code":"FN","product_code":"1151010","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":605},
{"principal_code":"FN","product_code":"1151011","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":488},
{"principal_code":"FN","product_code":"1111536","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":240},
{"principal_code":"FN","product_code":"1111529","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":12},
{"principal_code":"FN","product_code":"1111530","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":4},
{"principal_code":"FN","product_code":"1111556","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":5},
{"principal_code":"FN","product_code":"1151010","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":2},
{"principal_code":"FN","product_code":"1111516","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":2},
{"principal_code":"FN","product_code":"1111824","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":624},
{"principal_code":"FN","product_code":"1111844","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":192},
{"principal_code":"FN","product_code":"1151007","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":48},
{"principal_code":"FN","product_code":"1151006","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":48},
{"principal_code":"FN","product_code":"1151005","product_type":"Standard","area_type":"Hold Area Type","location_label":"QL","attribute":null,"quantity":48},
{"principal_code":"FN","product_code":"1111555","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":245},
{"principal_code":"FN","product_code":"1151010","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":1},
{"principal_code":"FN","product_code":"1151007","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":19},
{"principal_code":"FN","product_code":"1111844","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-12},
{"principal_code":"FN","product_code":"1151000","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":9},
{"principal_code":"FN","product_code":"1151001","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-6},
{"principal_code":"FN","product_code":"1111536","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":38},
{"principal_code":"FN","product_code":"1111517","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-5},
{"principal_code":"FN","product_code":"1151002","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-12},
{"principal_code":"FN","product_code":"1151003","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-16},
{"principal_code":"FN","product_code":"1111516","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-87},
{"principal_code":"FN","product_code":"1111503","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-17},
{"principal_code":"FN","product_code":"1151005","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-19},
{"principal_code":"FN","product_code":"1111502","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":26},
{"principal_code":"FN","product_code":"1151006","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-25},
{"principal_code":"FN","product_code":"1111528","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":6},
{"principal_code":"FN","product_code":"1111545","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":7},
{"principal_code":"FN","product_code":"1111555","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":23},
{"principal_code":"FN","product_code":"1111556","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":3},
{"principal_code":"FN","product_code":"1111529","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-1},
{"principal_code":"FN","product_code":"1111781","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":9},
{"principal_code":"FN","product_code":"1111799","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":12},
{"principal_code":"FN","product_code":"1111804","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-16},
{"principal_code":"FN","product_code":"1111824","product_type":"Standard","area_type":"Twilight Area Type","location_label":"Tw","attribute":null,"quantity":-112},
{"principal_code":"FN","product_code":"1111534","product_type":"Standard","area_type":"Bulk Area Type","location_label":"GS","attribute":null,"quantity":41}
];
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]
]
]
Ready to run.
Test | Ops/sec | |
---|---|---|
JSON strings |
| ready |
JSON numbers |
| ready |
MsgPack strings |
| ready |
MsgPack numbers |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.