Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Linux
Desktop
one year ago
Benchmark.js
weird boolean - .fill
22.6M/s
uint8 .fill()
20.7M/s
weird boolean - Strict
440K/s
boolean array - Strict
288K/s
boolean array
285K/s
typed Array with uInt8 - Strict
64K/s
typed Array with uInt8
60K/s
View exact numbers
Test name Executions per second
weird boolean - .fill 22,572,050 Ops/sec
uint8 .fill() 20,680,530 Ops/sec
weird boolean - Strict 439,534 Ops/sec
boolean array - Strict 287,610 Ops/sec
boolean array 284,599 Ops/sec
typed Array with uInt8 - Strict 63,762 Ops/sec
typed Array with uInt8 60,380 Ops/sec
Script Preparation code:
Tests: