@mathias Great talk. Thanks. Does a map on a packed HOLEY array return a PACKED or HOLEY?
e.g. Array(3).fill(1).map((_, i) => i) => [1,2,3] //HOLEY_ or _PACKED_
It’s not “converted” — `map` returns a new array. But yeah, if you use `map`, the result is always HOLEY.
-
-
Are there plans for v8 to have fewer false positives when classifying arrays? The various performance improvements you've made to arrays feel underutilised as most interactions with arrays will downgrade them to the least optimised.
-
HOLEY arrays are still optimized, though! Going HOLEY is not the end of the world. If it makes sense to use `map` in your code, don’t stop doing so.
- 5 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.