array vs object with big indexes

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
array
var arr = [];
for(var i = 0; i < 10000; i++){
arr[i*10000] = "string";
}
ready
object
var obj = {};
for(var i = 0; i < 10000; i++){
obj[i*10000] = "string";
}
ready

Revisions

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