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
check if the image will be in canvas view before rendering it to the canvas, is that extra bit of math worth it?
<canvas width="480" height="320"></canvas>
var can = document.getElementsByTagName("canvas")[0];
var ctx = can.getContext('2d');
var count = 1000;
var size = 64; // size of image
var x, y; // the position we will draw the image to our canvas
var img = new Image();
img.src = 'http://placekitten.com/' + size + '/' + size;
function rand(min, max)
{
return Math.floor(Math.random() * (max - min + 1)) + min;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
draw |
| ready |
check |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.