Script Preparation code:
Tests:

Historical Performance Data aggregated from 17 community runs

Desktop Results:
Chrome 9 runs
Uint8Array.slice
24.4M/s
ArrayBuffer.slice
4.1M/s

Fastest: Uint8Array.slice (6.0x faster)

View exact numbers
  • Uint8Array.slice: 24,409,220 ops/sec
  • ArrayBuffer.slice: 4,075,952 ops/sec
Firefox 8 runs
Uint8Array.slice
17.5M/s
ArrayBuffer.slice
15.8M/s

Fastest: Uint8Array.slice (1.1x faster)

View exact numbers
  • Uint8Array.slice: 17,487,344 ops/sec
  • ArrayBuffer.slice: 15,792,061 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
    ArrayBuffer.slice
    Uint8Array.slice

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Linux
View result in a separate tab
Uint8Array.slice
29.0M/s
ArrayBuffer.slice
3.0M/s
View exact numbers
Test name Executions per second
Uint8Array.slice 29,039,982 Ops/sec
ArrayBuffer.slice 3,003,196 Ops/sec