Script Preparation code:
Tests:

Historical Performance Data aggregated from 102 community runs

Desktop Results:
Chrome 57 runs
Uint8Array by byte
26.0M/s
DataView
26.0M/s
Uint8Array with set
1.6M/s

Fastest: Uint8Array by byte (16.0x faster)

View exact numbers
  • Uint8Array by byte: 25,996,158 ops/sec
  • DataView: 25,978,046 ops/sec
  • Uint8Array with set: 1,625,429 ops/sec
Firefox 21 runs
DataView
1009.5M/s
Uint8Array by byte
794.9M/s
Uint8Array with set
553K/s

Fastest: DataView (1824.2x faster)

View exact numbers
  • DataView: 1,009,463,552 ops/sec
  • Uint8Array by byte: 794,914,304 ops/sec
  • Uint8Array with set: 553,386 ops/sec
Mobile Results:
Chrome 16 runs
Uint8Array by byte
15.7M/s
DataView
15.6M/s
Uint8Array with set
1.1M/s

Fastest: Uint8Array by byte (14.3x faster)

View exact numbers
  • Uint8Array by byte: 15,698,158 ops/sec
  • DataView: 15,637,969 ops/sec
  • Uint8Array with set: 1,095,998 ops/sec
Safari 8 runs
DataView
205.8M/s
Uint8Array by byte
184.3M/s
Uint8Array with set
1.7M/s

Fastest: DataView (124.2x faster)

View exact numbers
  • DataView: 205,791,488 ops/sec
  • Uint8Array by byte: 184,314,512 ops/sec
  • Uint8Array with set: 1,657,535 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
    DataView
    Uint8Array by byte
    Uint8Array with set

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0
Firefox 146 on Linux
View result in a separate tab
Uint8Array by byte
2058.6M/s
DataView
2021.1M/s
Uint8Array with set
1.1M/s
View exact numbers
Test name Executions per second
Uint8Array by byte 2,058,639,488 Ops/sec
DataView 2,021,099,264 Ops/sec
Uint8Array with set 1,076,342 Ops/sec