prerendering

JavaScript performance comparison

Test case created

Preparation code

<canvas id="draw" height="110" width="800" style="border: solid;">
</canvas>
<script>
Benchmark.prototype.setup = function() {
    var obj = document.createElement("canvas");
    var ctx1 = obj.getContext("2d");
    ctx1.beginPath();
    ctx1.moveTo(0, 0);
    ctx1.lineTo(100, 100);
    ctx1.lineTo(200, 100);
    ctx1.lineTo(300, 110);
    ctx1.lineTo(600, 0);
    ctx1.stroke();
};
</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
no prerender
var ctx = draw.getContext("2d");

ctx.beginPath();
ctx.moveTo(0, 0);
ctx.lineTo(100, 100);
ctx.lineTo(200, 100);
ctx.lineTo(300, 110);
ctx.lineTo(600, 0);
ctx.stroke();
}
pending…
prerender
var ctx = draw.getContext("2d");
ctx.drawImage(obj, 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