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
<img id="onscreenImage" src="http://icons.iconarchive.com/icons/visualpharm/icons8-metro-style/512/Sciences-Classes-Test-tube-icon.png"/>
<canvas id="onscreenCanvas" width="1024" height="1024">
</canvas>
<script>
// globals
var onscreenImage = document.getElementById('onscreenImage');
var offscreenImage = document.createElement('img');
var offscreenCanvasSource = document.createElement('canvas');
offscreenCanvasSource.width = 512;
offscreenCanvasSource.height = 512;
var offscreenCanvasSource2d = offscreenCanvasSource.getContext('2d');
var onscreenCanvas = document.getElementById('onscreenCanvas');
var onscreenCanvas2d = onscreenCanvas.getContext('2d');
var offscreenCanvas = document.createElement('canvas');
offscreenCanvas.width = 1024;
offscreenCanvas.height = 1024;
var offscreenCanvas2d = offscreenCanvas.getContext('2d');
offscreenImage.onload = function ()
{
offscreenCanvasSource2d.drawImage(offscreenImage, 0, 0,512, 512, 0, 0, 512, 512);
// preview
onscreenCanvas2d.drawImage(offscreenImage, 0, 0, 512, 512, 0, 0, 512, 512);
onscreenCanvas2d.drawImage(offscreenCanvasSource, 0, 0, 512, 512, 512, 512, 512, 512);
};
offscreenImage.src = "http://icons.iconarchive.com/icons/visualpharm/icons8-metro-style/512/Sciences-Classes-Test-tube-icon.png";
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
offscreenImage |
| ready |
offscreenCanvasSource |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.