tilraunz

JavaScript performance comparison

Test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var x1 = 20, y1 = 41, x2=32.2,y2=323.2,  u = {x:(x1+x2)*0.5,y:(y2+y2)*0.5}
};
</script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
math
for (i=0;i<1000000;i++) {x = (x1+x2)*0.5; y = (y1+y2)*0.5;}
 
pending…
store
for (i=0;i<1000000;i++) {x = u.x; y = u.y}
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment