Test name | Executions per second |
---|---|
Map.get | 28912326.0 Ops/sec |
WeakMap.get | 26544018.0 Ops/sec |
array[0] | 28397164.0 Ops/sec |
object.a | 28786108.0 Ops/sec |
object[symbol] | 15630047.0 Ops/sec |
object[“0”] | 28769420.0 Ops/sec |
var map = new Map();
var weakMap = new WeakMap()
var array = [];
var object = {};
var symbol = Symbol('next');
map.get("0");
weakMap.get("0")
array[0]
object.a
object[symbol]
object["0"]