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
Check the performance of different canvas clear methods
<canvas id="c1" width="800" height="600"/>
var ctx = c1.getContext('2d');
var imageData = ctx.getImageData(0,0, 800, 600)
imageData.data.set(new Uint8ClampedArray(800*600*4))
ctx.fillStyle="#FFFFFF"
Ready to run.
Test | Ops/sec | |
---|---|---|
clearRect |
| ready |
reset transform |
| ready |
save transform to local variable |
| ready |
update height hack |
| ready |
fill canvas with some color |
| ready |
set saved empty data |
| ready |
fill with color |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.