canvasclear (v18)

Revision 18 of this benchmark created on


Preparation HTML

<canvas id="canvas1">
</canvas>
<script>
  var can = document.getElementById('canvas1');
  can.width = window.innerWidth;
  can.height = window.innerHeight;
  var ctx = can.getContext('2d');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
canvas width
can.width = can.width;
ready
window innerWidth
can.width = window.innerWidth;
ready
window + check
can.width = window.innerWidth;
if (can.height !== window.innerHeight) can.height = window.innerHeight;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.