ouh aowehfou

JavaScript performance comparison

Test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var ar = [];
   
    for (var i=0;i<10;i++) {
    ar.push('ohaowahf');
    }
};
</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
forEach
ar.forEach(function(item){
});
pending…
while
var item;
while(item = ar.shift()) {};
pending…
for
for (var i=0,l=ar.length;i<l;i++) { var item = ar[i]; }
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