Test name | Executions per second |
---|---|
Native fill | 67216.3 Ops/sec |
Fill with loop | 16.6 Ops/sec |
New array | 20846.3 Ops/sec |
var size = 1080 * 720;
var globalArray = new Uint8Array(size);
globalArray.fill(0);
var n = size;
while(n--) globalArray[n] = 0;
globalArray = new Uint8Array(size);