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()?
-
-
If that turns out to be feasible, the “a sufficiently advanced compiler” argument applies, and we don’t need Array.create or any other new language features.

-
It would be very interesting to see how this turns out.

- 3 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.