Test name | Executions per second |
---|---|
Set spread | 551322.3 Ops/sec |
Array from set | 633284.5 Ops/sec |
Filter | 1649817.1 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)