7 ms·
The default size of an array for V8 is over 1304209 elements?
by mcguire 9y ago
The default size of an array for V8 is over 1304209 elements?
- minitech 9y agoWhen it runs out of space, it resizes to (at least) a multiple of its current space to avoid having to resize too often, making pushing a constant-time operation on average. 1304209 is the smallest size in the sequence starting with an empty array that’s at least 1048576.