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
<canvas id="canvas" width="300" height="300" style="width:300px; height:300px;">
<canvas id="new-canvas" width="300" height="300" style="width:300px; height:300px;">
canvas = document.getElementById("canvas");
ctx = canvas.getContext("2d");
imageData = ctx.createImageData(300, 300);
for (var i=0; i<300*300; i++){
imageData.data[i*4+0]=Math.round(Math.random()*255);
imageData.data[i*4+1]=Math.round(Math.random()*255);
imageData.data[i*4+2]=Math.round(Math.random()*255);
imageData.data[i*4+3]=255;
}
ctx.putImageData(imageData, 0, 0);
imageDataURL = canvas.toDataURL();
newCanvas = document.getElementById("new-canvas");
Ready to run.
Test | Ops/sec | |
---|---|---|
dataURLs |
| ready |
canvas only |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.