DataView vs Uint8Array by byte vs Uint8Array with set vs with Float64ArrayFastest: Uint8Array by byte (52.6x faster)
38,498,392 ops/sec
38,420,432 ops/sec
858,184 ops/sec
732,604 ops/sec
Fastest: Uint8Array by byte (1736.5x faster)
1,218,149,504 ops/sec
1,212,238,976 ops/sec
794,758 ops/sec
701,511 ops/sec
Fastest: Uint8Array by byte (27.7x faster)
12,186,087 ops/sec
12,163,494 ops/sec
661,659 ops/sec
439,278 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| DataView | |
| Uint8Array by byte | |
| Uint8Array with set | |
| with Float64Array |
| Test name | Executions per second |
|---|---|
| ✓ Uint8Array by byte | 160,656,048 Ops/sec |
| DataView | 160,057,120 Ops/sec |
| Uint8Array with set | 970,046 Ops/sec |
| with Float64Array | 928,688 Ops/sec |