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
var canvas1 = document.createElement('canvas')
;
var canvas2 = document.createElement('canvas')
;
var canvas3 = document.createElement('canvas')
;
for (var canvas of [canvas1, canvas2, canvas3]) {
canvas.width = 1024;
canvas.height = 1024;
}
const opts = {
alpha: false,
};
var cx1 = canvas1.getContext('2d', opts);
var cx2 = canvas2.getContext('2d', opts);
var cx3 = canvas3.getContext('2d', opts);
for (var cx of [cx1, cx2, cx3]) {
cx.globalCompositeOperation = 'copy';
}
// Fill them with random contents to prevent
// framebuffer compression
const imgdata = new ImageData(canvas1.width, canvas2.height);
for (let i = 0; i < imgdata.data.length; ++i) {
imgdata.data[i] = Math.random() * 256;
}
for (var cx of [cx1, cx2]) {
cx.putImageData(imgdata, 0, 0);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
drawImage(self) |
| ready |
drawImage(other) |
| ready |
drawImage(self) by ping-pong |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.