2012年12月30日10时57分17秒

Benchmark created on


Setup

var items=[1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0];
    function process(ttt){
    alert(ttt);
    }

Test runner

Ready to run.

Testing in
TestOps/sec
1
for (var i=0, len=items.length; i < len; i++){ 
   process(items[i]); 
} 
ready
2
for (var i=0; i < items.length; i++){ 
   process(items[i]); 
} 
ready
3
for (var i=items.length; i--;){ 
   process(items[i]); 
} 
ready

Revisions

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