Partial Re-rendering

JavaScript performance comparison

Revision 9 of this test case created


How much faster is it to render just the parts of the canvas that changed, compared to the whole thing?

Rendering a white dot that moves across a black background.

Preparation code

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

  var HEIGHT = 100;

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
re-render whole scene
      context.fillStyle = "red";
      context.fillStyle = "white";
only render differences
for (var i = 0; i < 500; i++) {


Compare results of other browsers


You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:


Comment form temporarily disabled.

Add a comment