Run details:
Mozilla/5.0 (Linux; Android 8.1.0; M1852 Build/OPM1.171019.026) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.104 Mobile Safari/537.36
Chrome Mobile 96
Android 8.1.0
Mobile
one month ago
Test name Executions per second
Array.reverse() 21957.0 Ops/sec
TypedArray.reverse() 97001.3 Ops/sec
Array.toSorted() 0.0 Ops/sec
TypedArray.toSorted() 0.0 Ops/sec
Array.sort() 177.9 Ops/sec
TypedArray.sort() 9914.7 Ops/sec
Array[i] (sequential) 153.7 Ops/sec
TypedArray[i] (sequential) 162.5 Ops/sec
Array[i] (random) 51.5 Ops/sec
TypedArray[i] (random) 54.5 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)