(array)
| 24 | }); |
| 25 | |
| 26 | function shuffleArray(array) { |
| 27 | for (let i = array.length - 1; i > 0; i--) { |
| 28 | const j = Math.floor(Math.random() * (i + 1)); |
| 29 | const temp = array[i]; |
| 30 | array[i] = array[j]; |
| 31 | array[j] = temp; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | function benchmark(method, n, values, values2, order) { |
| 36 | const actual = new Set(values); |