Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000
21K/s
SORT: array 10000 items; itemIndex - 10000
4K/s

Fastest: SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000 (4.9x faster)

View exact numbers
  • SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000: 21,467 ops/sec
  • SORT: array 10000 items; itemIndex - 10000: 4,339 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000
    SORT: array 10000 items; itemIndex - 10000

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Windows
View result in a separate tab
SPLICE + UNSHIFT: array 10000 items; itemIndex - 10000
2K/s
SORT: array 10000 items; itemIndex - 10000
827/s
View exact numbers
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