Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132
Windows
Desktop
9 days ago
Test name Executions per second
Array.reverse() 82261.4 Ops/sec
TypedArray.reverse() 77972.2 Ops/sec
Array.toSorted() 272.9 Ops/sec
TypedArray.toSorted() 9607.7 Ops/sec
Array.sort() 558.3 Ops/sec
TypedArray.sort() 10195.6 Ops/sec
Array[i] (sequential) 66562.8 Ops/sec
TypedArray[i] (sequential) 76668.6 Ops/sec
Array[i] (random) 26428.9 Ops/sec
TypedArray[i] (random) 26419.4 Ops/sec
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)


;