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
Using pre-rendering to optimize pixel-based Canvas operations.
<canvas id="canvas" width="100" height="100">
</canvas>
<script>
canvas = document.getElementById("canvas");
var SCREEN_WIDTH = canvas.width;
var SCREEN_HEIGHT = canvas.height;
context = canvas.getContext("2d");
image = context.getImageData(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
imageData = context.createImageData(SCREEN_WIDTH, SCREEN_HEIGHT);
var r = 100;
var g = 50;
var b = 60;
var a = 100;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
direct manipulation |
| ready |
pre-rendering |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.