Tests:
-
Array.findIndex
-
Array.indexOf
-
Array.from(new Set(array))
-
Object-filter
-
Object-values
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox 126 on Windows
View result in a separate tab
Array.from(new Set(array))
4K/s
View exact numbers
| Test name |
Executions per second |
|
✓
Object-values
|
10,601 Ops/sec |
|
Object-filter
|
9,753 Ops/sec |
|
Array.from(new Set(array))
|
4,068 Ops/sec |
|
Array.indexOf
|
118 Ops/sec |
|
Array.findIndex
|
80 Ops/sec |
Do you really want to delete benchmark?