Script Preparation code:
Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
weird boolean - .fill
24.9M/s
uint8 .fill()
22.3M/s
weird boolean - Strict
515K/s
boolean array - Strict
405K/s
boolean array
378K/s
typed Array with uInt8
93K/s
typed Array with uInt8 - Strict
80K/s

Fastest: weird boolean - .fill (311.0x faster)

View exact numbers
  • weird boolean - .fill: 24,851,132 ops/sec
  • uint8 .fill(): 22,281,420 ops/sec
  • weird boolean - Strict: 515,184 ops/sec
  • boolean array - Strict: 404,687 ops/sec
  • boolean array : 377,665 ops/sec
  • typed Array with uInt8: 93,113 ops/sec
  • typed Array with uInt8 - Strict: 79,914 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
    boolean array
    typed Array with uInt8
    boolean array - Strict
    typed Array with uInt8 - Strict
    weird boolean - Strict
    uint8 .fill()
    weird boolean - .fill

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Chrome 139 on Linux
View result in a separate tab
weird boolean - .fill
27.4M/s
uint8 .fill()
25.1M/s
weird boolean - Strict
580K/s
boolean array - Strict
431K/s
boolean array
426K/s
typed Array with uInt8 - Strict
90K/s
typed Array with uInt8
78K/s
View exact numbers
Test name Executions per second
weird boolean - .fill 27,392,968 Ops/sec
uint8 .fill() 25,077,322 Ops/sec
weird boolean - Strict 580,057 Ops/sec
boolean array - Strict 431,249 Ops/sec
boolean array 425,621 Ops/sec
typed Array with uInt8 - Strict 90,247 Ops/sec
typed Array with uInt8 77,757 Ops/sec