Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Windows
Desktop
2 years ago
Benchmark.js
weird boolean - .fill
16.6M/s
uint8 .fill()
15.9M/s
weird boolean - Strict
831K/s
boolean array
517K/s
boolean array - Strict
486K/s
typed Array with uInt8 - Strict
135K/s
typed Array with uInt8
119K/s
View exact numbers
Test name Executions per second
weird boolean - .fill 16,557,874 Ops/sec
uint8 .fill() 15,926,919 Ops/sec
weird boolean - Strict 830,560 Ops/sec
boolean array 516,750 Ops/sec
boolean array - Strict 486,320 Ops/sec
typed Array with uInt8 - Strict 134,508 Ops/sec
typed Array with uInt8 119,206 Ops/sec
Script Preparation code:
Tests: