AFAICT, there is no good way of pre-allocating a large array in JavaScript. new Array(LEN) creates an array that’s slower due to it being “holey”. Time for Array.create()?
-
-
It would be very interesting to see how this turns out.

-
I'm wondering what's the concrete example where "holey arrays" are significantly slower than "packed arrays"?
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
