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="bg" width="640" height="480" style="position: absolute;"></canvas>
<canvas id="fg" width="640" height="480" style="position: absolute;"></canvas>
<div style="min-width: 640px; min-height: 480px;">
</div>
<script>
var fg = document.getElementById('fg');
var bg = document.getElementById('bg');
var fg_ctx = fg.getContext('2d');
var bg_ctx = bg.getContext('2d');
function background(ctx) {
ctx.fillStyle = 'black';
ctx.fillRect(0, 0, bg.width, bg.height);
}
function foreground(ctx) {
ctx.fillStyle = 'red';
ctx.fillRect(100, 100, 64, 64);
}
</script>
bg_ctx.clearRect(0, 0, bg.width, bg.height);
fg_ctx.clearRect(0, 0, fg.width, fg.height);
background(bg_ctx);
Ready to run.
Test | Ops/sec | |
---|---|---|
no layers |
| ready |
layers |
| ready |
layers, clearing the fg layer |
| ready |
layers, clearing entire fg layer |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.