constArray (v4)

Revision 4 of this benchmark created by qinjia on


Test runner

Ready to run.

Testing in
TestOps/sec
Array().join.split
var arr = Array(10000).join(' ').split('').map(function(item,index){return index})
ready
Array.from
var arr = Array.from({length:10000}).map(function(item,index){return index})
ready
for
var arr = [];
for(var i = 0; i< 10000; i++){
   arr.push(i);
}
ready

Revisions

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

  • Revision 4: published by qinjia on