Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Linux
Desktop
7 months ago
Test name Executions per second
Array.reverse() 39873.2 Ops/sec
TypedArray.reverse() 137337.1 Ops/sec
Array.toSorted() 62.1 Ops/sec
TypedArray.toSorted() 1173.0 Ops/sec
Array.sort() 417.6 Ops/sec
TypedArray.sort() 19256.9 Ops/sec
Array[i] (sequential) 703.7 Ops/sec
TypedArray[i] (sequential) 725.4 Ops/sec
Array[i] (random) 232.4 Ops/sec
TypedArray[i] (random) 233.0 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)


;