lijia3

JavaScript performance comparison

Revision 30 of this test case created

Preparation code

                <canvas id="board1" width="730" height="100"></canvas>
                <canvas id="board2" width="150"height="50"></canvas>
<script>
Benchmark.prototype.setup = function() {
    var a=board1.getContext("2d");
    var b=board2.getContext("2d");
    var c=board2;
   
    a.font="50px times";
    b.font="50px times";
    var width=a.measureText("1213+123").width;
    b.fillText("1213+123",30,30);
   
};
</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
1


a.fillText("1213+123",50,30);
pending…
2

a.drawImage(c,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