new TypedArray vs new Array vs Direct ArrayFastest: new TypedArray (1.4x faster)
126 ops/sec
122 ops/sec
91 ops/sec
Fastest: new TypedArray (3.1x faster)
210 ops/sec
68 ops/sec
67 ops/sec
Fastest: new Array (4.8x faster)
551 ops/sec
336 ops/sec
115 ops/sec
Fastest: new TypedArray (1.6x faster)
64 ops/sec
47 ops/sec
39 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| new TypedArray | |
| new Array | |
| Direct Array |
| Test name | Executions per second |
|---|---|
| ✓ new TypedArray | 232 Ops/sec |
| Direct Array | 104 Ops/sec |
| new Array | 104 Ops/sec |