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="500" height="500"></canvas>
var i = 0,
canvas,
image = new Image(),
toDataUrl = new Image(),
drawCanvas = document.getElementById('canvas'),
drawCtx = drawCanvas.getContext('2d'),
i,
size = 32;
rx = 250,
ry = 250,
a = 10,
t = Math.PI/64,
image.src = "http://c.dryicons.com/images/icon_sets/coquette_part_9_icons_set/png/32x32/speedometer.png";
canvas = document.createElement('canvas'),
canvas.width = size;
canvas.height = size;
ctx = canvas.getContext('2d');
ctx.arc(size/2, size/2, size, 0, Math.PI*2, true);
ctx.globalAlpha = '0.2';
ctx.fillStyle = "red";
ctx.fill();
toDataUrl.src = canvas.toDataURL("image/png");
i = 0;
Ready to run.
Test | Ops/sec | |
---|---|---|
canvas as argument |
| ready |
toDataURL() as argument |
| ready |
new Image() as argument |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.