Test name | Executions per second |
---|---|
spread | 19432.3 Ops/sec |
Array.from | 20791.0 Ops/sec |
var arr = [];
for (var i = 0; i < 10000; i++) {
arr.push(Math.floor(Math.random() * 1000));
}
const ss = new Set(arr)
arr = [ss]
arr = Array.from(new Set(arr))