Test name | Executions per second |
---|---|
Set spread | 566592.5 Ops/sec |
Array from set | 610246.3 Ops/sec |
Filter | 1813161.0 Ops/sec |
var array = Array.from({length: 20}, () => Math.floor(Math.random() * 140));
const f = [ new Set(array)]
const l = Array.from(new Set(array))
const b = array.filter((i,index,a) => a.indexOf(i) === index)