Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
slice() with map()
129K/s
slice() with Array.from()
118K/s
readUint8() with for loop
3K/s

Fastest: slice() with map() (44.7x faster)

View exact numbers
  • slice() with map(): 128,872 ops/sec
  • slice() with Array.from(): 117,505 ops/sec
  • readUint8() with for loop: 2,884 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    readUint8() with for loop
    slice() with map()
    slice() with Array.from()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Windows
View result in a separate tab
slice() with Array.from()
153K/s
slice() with map()
138K/s
readUint8() with for loop
23K/s
View exact numbers
Test name Executions per second
slice() with Array.from() 153,413 Ops/sec
slice() with map() 137,949 Ops/sec
readUint8() with for loop 22,900 Ops/sec