Partial Re-rendering

JavaScript performance comparison

Revision 14 of this test case created by

Preparation code

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

Preparation code output

<canvas id="c" width="640" height="480"></canvas>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
re-render whole scene
for (var i = 0; i < canvas.width; i++) {
  context.fillStyle = '#000';
  context.clearRect(0, 0, canvas.width, canvas.height);
  context.fillStyle = '#fff';
  context.fillRect(i, HEIGHT, 300, 300);
}
pending…
only render differences
for (var i = 0; i < canvas.width; i++) {
  context.fillStyle = 'black';
  context.clearRect(i-1, HEIGHT, 300,300);
  context.fillStyle = 'white';
  context.fillRect(i, HEIGHT, 300, 300);
}
pending…

Compare results of other browsers

Revisions

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

0 Comments