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
NOTE: this uses the proprietary -webkit-canvas property, so this will only work on safari and chrome.
<canvas id="canvas" width="300" height="300">
</canvas>
<div id="div" style="width:300px;height:300px;background:-webkit-canvas('div');">
</div>
<script>
var canvas_ctx = document.getElementById("canvas").getContext('2d');
var div_ctx = document.getCSSCanvasContext('2d', 'div', 300, 300);
function draw(ctx) {
ctx.clearRect(0, 0, 300, 300);
ctx.fillStyle = "blue";
ctx.fillRect(0, 0, 300, 300);
ctx.fillStyle = "rgba(100,200,50,0.5)";
ctx.fillRect(0, 0, 100, 100);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Canvas Element |
| ready |
Div Background |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.