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
8 months ago
Test name Executions per second
Array.reverse() 40121.2 Ops/sec
TypedArray.reverse() 140383.0 Ops/sec
Array.sort() 425.4 Ops/sec
TypedArray.sort() 37154.2 Ops/sec
Array.map() 1792.0 Ops/sec
TypedArray.map() 2066.3 Ops/sec
Array[i] (sequential) 698.4 Ops/sec
TypedArray[i] (sequential) 732.5 Ops/sec
Array[i] (random) 233.3 Ops/sec
TypedArray[i] (random) 233.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)