Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0
Firefox 128
Windows
Desktop
2 years ago
Benchmark.js
weird boolean - .fill
3.4M/s
uint8 .fill()
620K/s
weird boolean - Strict
435K/s
typed Array with uInt8 - Strict
61K/s
typed Array with uInt8
57K/s
boolean array - Strict
44K/s
boolean array
39K/s
View exact numbers
Test name Executions per second
weird boolean - .fill 3,440,042 Ops/sec
uint8 .fill() 619,949 Ops/sec
weird boolean - Strict 434,733 Ops/sec
typed Array with uInt8 - Strict 61,088 Ops/sec
typed Array with uInt8 56,875 Ops/sec
boolean array - Strict 43,560 Ops/sec
boolean array 39,499 Ops/sec
Script Preparation code:
Tests: