Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133
Mac OS X 10.15.7
Desktop
one year ago
Benchmark.js
weird boolean - .fill
77.2M/s
uint8 .fill()
50.6M/s
weird boolean - Strict
1.4M/s
boolean array - Strict
916K/s
boolean array
912K/s
typed Array with uInt8 - Strict
212K/s
typed Array with uInt8
202K/s
View exact numbers
Test name Executions per second
weird boolean - .fill 77,234,064 Ops/sec
uint8 .fill() 50,637,920 Ops/sec
weird boolean - Strict 1,381,560 Ops/sec
boolean array - Strict 915,569 Ops/sec
boolean array 912,454 Ops/sec
typed Array with uInt8 - Strict 211,877 Ops/sec
typed Array with uInt8 202,463 Ops/sec
Script Preparation code:
Tests: