Script Preparation code:
Tests:
  • Array.reverse()

  • TypedArray.reverse()

  • Array.toSorted()

  • TypedArray.toSorted()

  • Array.sort()

  • TypedArray.sort()

  • Array[i] (sequential)

  • TypedArray[i] (sequential)

  • Array[i] (random)

  • TypedArray[i] (random)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Array.reverse()
    TypedArray.reverse()
    Array.toSorted()
    TypedArray.toSorted()
    Array.sort()
    TypedArray.sort()
    Array[i] (sequential)
    TypedArray[i] (sequential)
    Array[i] (random)
    TypedArray[i] (random)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 13 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
Chrome 131 on Windows
View result in a separate tab
Test name Executions per second
Array.reverse() 99964.1 Ops/sec
TypedArray.reverse() 233753.5 Ops/sec
Array.toSorted() 128.0 Ops/sec
TypedArray.toSorted() 1429.9 Ops/sec
Array.sort() 971.7 Ops/sec
TypedArray.sort() 52385.3 Ops/sec
Array[i] (sequential) 40390.9 Ops/sec
TypedArray[i] (sequential) 38310.3 Ops/sec
Array[i] (random) 20712.4 Ops/sec
TypedArray[i] (random) 18417.8 Ops/sec