@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_
I think that’s a good approach! Write idiomatic code that makes the most sense to you, and (only) when you run into a performance issue:
1) let @v8js know so we can fix it, and
2) play around with avoiding holeyness to see if that makes a difference.

-
-
If you could pop these into the backlog somewhere: re-evaluating 'element kind' on .fill (as the simple case packs an array with a static type) and .map (somewhat more difficult than .fill) would be useful boons as more arrays would end up being optimised more often. Ta
-
I brought up the `fill` case myself when I learned about elements kinds. Here’s the counter-argument: https://twitter.com/mathias/status/976531175060615169 … + https://twitter.com/mathias/status/976531391927078912 … It’s likely not worth the effort. That said, I’ll bring it up again once I get back to Munich. Thanks for your feedback!
- 1 more reply
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.