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
Tests drawing shapes with rgba fill colours vs rgb fill colours (solid) on top of an image background.
<div id="image" style="background-image: url('http://lighttalk.via-verlag.com/wp-content/uploads/2012/10/2505946893_4bae34a1af.jpg'); width: 500px; height: 500px;">
<canvas id="canvas" width="500" height="500">
</canvas>
</div>
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var can2 = document.createElement('canvas');
can2.width = 500;
can2.height = 500;
var ctx2 = can2.getContext('2d');
ctx2.fillStyle = "rgb(96, 169, 23)";
ctx2.beginPath();
ctx2.arc(250, 250, 250, 0, Math.PI*2, true);
ctx2.fill();
var can3 = document.createElement('canvas');
can3.width = 500;
can3.height = 500;
var ctx3 = can2.getContext('2d');
ctx3.fillStyle = "rgba(96, 169, 23, 0.65)";
ctx3.beginPath();
ctx3.arc(250, 250, 250, 0, Math.PI*2, true);
ctx3.fill();
ctx.clearRect(0,0,500,500);
Ready to run.
Test | Ops/sec | |
---|---|---|
Solid Rectangle |
| ready |
Alpha Rectangle |
| ready |
Solid Circle |
| ready |
Alpha Circle |
| ready |
Pre-rendered Solid Circle |
| ready |
Pre-Rendered Alpha Circle |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.