Array from Set vs Lodash Uniq vs Array Unique vs For LoopFastest: Array Unique (2.6x faster)
855,905 ops/sec
585,537 ops/sec
371,900 ops/sec
323,541 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Array from Set | |
| Lodash Uniq | |
| Array Unique | |
| For Loop |
| Test name | Executions per second |
|---|---|
| ✓ Array Unique | 858,119 Ops/sec |
| For Loop | 771,542 Ops/sec |
| Array from Set | 740,219 Ops/sec |
| Lodash Uniq | 335,368 Ops/sec |