10 ms·
The difference is that those operations are on the root ArrayBuffer in JS, not the TypedArray views on that buffer. In Go, the underlying array is fixed, and e
by iainmerrick 4y ago
The difference is that those operations are on the root ArrayBuffer in JS, not the TypedArray views on that buffer.
In Go, the underlying array is fixed, and each slice independently has resize/reallocate operations.
The JS approach seems better and more comprehensible to me. (I note also that MDN lists “resizable” and “maxByteLength” as new experimental features.)