Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Firefox 7 runs
Uint8Array.slice
19.7M/s
Uint8Array.subarray
16.5M/s

Fastest: Uint8Array.slice (1.2x faster)

View exact numbers
  • Uint8Array.slice: 19,680,396 ops/sec
  • Uint8Array.subarray: 16,501,719 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
    Uint8Array.subarray
    Uint8Array.slice

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
Firefox 140 on Windows
View result in a separate tab
Uint8Array.slice
4.1M/s
Uint8Array.subarray
3.8M/s
View exact numbers
Test name Executions per second
Uint8Array.slice 4,135,539 Ops/sec
Uint8Array.subarray 3,788,178 Ops/sec