Test name | Executions per second |
---|---|
Test Uint8Array.from() | 80690.5 Ops/sec |
Test new Uint8Array() | 107662.5 Ops/sec |
var randomArray = Array.from({ length: 1000 }, () => Math.floor(Math.random() * 256))
Uint8Array.from(randomArray)
new Uint8Array(randomArray)