Outside/Inside Canvas (v15)

Revision 15 of this benchmark created by Sev on


Preparation HTML

<canvas id="c" width="640" height="480"></canvas>
<script>
  var canvas = document.getElementById('c');
  var context = canvas.getContext('2d');
  context.fillStyle = '#ffcc00';
  
  var HEIGHT = 100;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
draw expensive inside
context.arc(50, 50, 40, 0, 1);
context.fill();
ready
draw inside
context.fillRect(50,50,100,20);
ready
draw outside
context.fillRect(500,500,100,20);
ready
draw expensive outside
context.arc(5000, 5000, 40, 0, 1);
context.fill();
ready

Revisions

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