Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Linux
Desktop
6 months ago
Test name Executions per second
Array.reverse() 39870.5 Ops/sec
TypedArray.reverse() 138508.8 Ops/sec
Array.toSorted() 62.0 Ops/sec
TypedArray.toSorted() 1191.7 Ops/sec
Array.sort() 412.9 Ops/sec
TypedArray.sort() 19368.6 Ops/sec
Array[i] (sequential) 682.0 Ops/sec
TypedArray[i] (sequential) 698.7 Ops/sec
Array[i] (random) 225.0 Ops/sec
TypedArray[i] (random) 225.6 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)


;