Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
2 years ago
Benchmark.js
weird boolean - .fill
8.4M/s
uint8 .fill()
8.0M/s
boolean array - Strict
378K/s
weird boolean - Strict
365K/s
boolean array
297K/s
typed Array with uInt8
108K/s
typed Array with uInt8 - Strict
65K/s
View exact numbers
Test name Executions per second
weird boolean - .fill 8,400,746 Ops/sec
uint8 .fill() 7,958,483 Ops/sec
boolean array - Strict 378,125 Ops/sec
weird boolean - Strict 365,244 Ops/sec
boolean array 296,692 Ops/sec
typed Array with uInt8 108,470 Ops/sec
typed Array with uInt8 - Strict 64,681 Ops/sec
Script Preparation code:
Tests: