SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000 vs SORT: array 10000 items; itemIndex - 10000Fastest: SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000 (4.9x faster)
21,467 ops/sec
4,339 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000 | |
| SORT: array 10000 items; itemIndex - 10000 |
| Test name | Executions per second |
|---|---|
| ✓ SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000 | 1,967 Ops/sec |
| SORT: array 10000 items; itemIndex - 10000 | 827 Ops/sec |