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="300" height="300"></canvas>
<script>
canvas = document.getElementById("canvas");
ctx = canvas.getContext('2d');
rectArea = {
x: 30,
y: 30,
w: canvas.width / 2 - 30 / 2,
h: canvas.height / 2 - 30 / 2
}
ctx.fillStyle = 'rgb(255, 0, 0)';
ctx.strokeStyle = 'black';
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
rect + fill |
| ready |
fillRect |
| ready |
fill existing rect |
| ready |
fillRect with beginPath |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.