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 width="800" height="600" id="canvas"></canvas>
<script>
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var images = [new Image(), new Image(), new Image(), new Image()];
var canvases = [];
var w = canvas.width,
h = canvas.height;
images[0].src = 'http://www.w3.org/html/logo/downloads/HTML5_Badge_512.png';
images[1].src = 'http://www.w3.org/html/logo/downloads/HTML5_Badge_128.png';
images[2].src = 'http://www.w3.org/html/logo/downloads/HTML5_Badge_32.png';
for ( var i = 0; i < images.length; i++ ) {
images[i].onload = (function(j) {
return function() {
var c = document.createElement('canvas');
c.width = images[j].width;
c.height = images[j].height;
c.getContext('2d').drawImage( images[j], 0, 0 );
canvases[j] = c;
}
})(i);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Large Canvas |
| ready |
Large Image |
| ready |
Medium Canvas |
| ready |
Medium Image |
| ready |
Small Canvas |
| ready |
Small Image |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.