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
<script src="https://www.movesinstitute.org/~mcgredo/js/dis.js"></script>
// A somewhat typical DIS Entity State PDU
var disData = new Uint8Array([6, 1, 1, 1, -125, 18, 91, -13, 144, -112, 0, 44, 0, 0, 0, 1, 2, 57, 0, 0, 1, 1, 0, -31, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 65, 72, -63, 32, 49, 83, -5, 65, 81, -117, 100, -34, -54, -31, -53, 65, 76, -39, -92, -36, -81, -65, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
var ab = new ArrayBuffer(144);
var dv = new Uint8Array(ab);
var idx = 0;
for(idx = 0; idx < 144; idx++)
{
dv[idx] = disData[idx];
};
// JSON format DIS
var disText = '{"protocolVersion":6,"exerciseID":0,"pduType":1,"protocolFamily":1,"timestamp":0,"pduLength":0,"padding":0,"entityID":{"site":0,"application":0,"entity":0},"forceId":0,"numberOfArticulationParameters":0,"entityType":{"entityKind":0,"domain":0,"country":0,"category":0,"subcategory":0,"spec":0,"extra":0},"alternativeEntityType":{"entityKind":0,"domain":0,"country":0,"category":0,"subcategory":0,"spec":0,"extra":0},"entityLinearVelocity":{"x":0,"y":0,"z":0},"entityLocation":{"x":0,"y":0,"z":0},"entityOrientation":{"psi":0,"theta":0,"phi":0},"entityAppearance":0,"deadReckoningParameters":{"deadReckoningAlgorithm":0,"otherParameters":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"entityLinearAcceleration":{"x":0,"y":0,"z":0},"entityAngularVelocity":{"x":0,"y":0,"z":0}},"marking":{"characterSet":0,"characters":[0,0,0,0,0,0,0,0,0,0,0]},"capabilities":0,"articulationParameters":[]}';
Ready to run.
Test | Ops/sec | |
---|---|---|
JSON format DIS Text, via Eval |
| ready |
IEEE 1278.1 Binary DIS |
| ready |
JSON format DIS Text, via Native JSON Parser |
| ready |
IEEE 1278.1, Binary DIS Fast ESPDU |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.