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 ctx=obj.getContext("2d");
    ctx.beginPath();
    ctx.moveTo(10,10);
    ctx.lineTo(10,30);
    ctx.lineTo(30,30);
    ctx.lineTo(40,70);
    ctx.quadraticCurveTo(72,43,22,12);
    ctx.quadraticCurveTo(12,43,12,102);
    ctx.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(10,10);
ctx.lineTo(10,30);
ctx.lineTo(30,30);
ctx.lineTo(40,70);
ctx.quadraticCurveTo(72,43,22,12);
ctx.quadraticCurveTo(12,43,12,102);
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