Test name | Executions per second |
---|---|
Filter | 262727.2 Ops/sec |
Set | 479840.4 Ops/sec |
var array = Array.from({ length: 60 }, () => Math.floor(Math.random() * 140));
const filterF = array.filter((a, b) => array.indexOf(a) === b)
const filterS = [new Set(array)]