render-vs-prerender

JavaScript performance comparison

Revision 44 of this test case created

Preparation code

<canvas id="canvas1" width="640" height="480">
</canvas>
<script>
var cv1 = document.getElementById("canvas1"),
    ctx = cv1.getContext("2d"),
    img = new Image(),
    cvs;
img.onload = function() {
  cvs = document.createElement("canvas");
  cvs.width = this.width;
  cvs.height = this.height;
  cvs.getContext("2d").drawImage(this, 0, 0);
}
img.src = "http://www.ausmt.org/imagefiles/136/136LEFigure1.png";
</script>

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
render-image
ctx.drawImage(img, 0, 0);
pending…
pre-rendered canvas
ctx.drawImage(cvs, 0, 0);
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. Here’s a list of current revisions for this page:

0 comments

Add a comment