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
Which is faster? A bunch of getImageData calls or one big one with the RAM munchies?
<script>
var canvas = document.createElement( 'canvas' );
canvas.height = 20;
canvas.width = 20;
var ctx = canvas.getContext( '2d' ),
coords = [];
ctx.beginPath();
ctx.strokeStyle = "#999";
ctx.lineWidth = 5;
ctx.moveTo( 5,5);
ctx.lineTo( 915, 915 );
ctx.stroke();
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
pixel by pixel |
| ready |
entire thing |
| ready |
entire thing one loop |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.