Array vs Object

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array
var A = [ 0, 1, 2 ];
ready
Numbered Object
var B = { 0: 0, 1: 1, 2: 2 };
ready
Numbered Object (string)
var C = { "0": 0, "1": 1, "2": 2 }
ready
Standard Object
var D = { x: 0, y: 1, z: 2 };
ready
Standard Object (string)
var E = { "x": 0, "y": 1, "z": 2 };
ready

Revisions

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