Test name | Executions per second |
---|---|
Set set | 6593364.5 Ops/sec |
Get set | 6591761.0 Ops/sec |
Set dict | 7071026.0 Ops/sec |
Get dict | 7088184.5 Ops/sec |
s = new Set();
d = {};
for (var i=0;i<10;i++){
s.add(i);
d[i]=true;
}
s.add(5)
s.has(3)
d[5] = true
d[5]