for in each

Benchmark created by Tomás Hernández on


Test runner

Ready to run.

Testing in
TestOps/sec
For
var arr = [1,2,3,"a","b","c",true,false,null,undefined], clone=[];
for(x=0; x<arr.length; x++){
    clone.push(arr[x]);
}

 
ready
For in
var arr = [1,2,3,"a","b","c",true,false,null,undefined], clone=[];
for(x in arr){
    clone.push(arr[x]);
}
ready

Revisions

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

  • Revision 1: published by Tomás Hernández on