Revise Array Strategies #246
Labels
enhancement
Improves the implementation with something noteworthy
help wanted
Would be great if you could help out here.
Projects
The current array strategies are likely not optimal.
It might be useful to revise them to be more eager.
Currently, I am using a
PartiallyEmptyArray
strategy to avoid reallocating the underlying array for cases where we get first something primitive, and then an object after all.Not sure how common the scenario is, but it misses optimization potential, for instance for
In that case, the result array in the
PromiseGroup
is always going to remain partial for most of the time, while it could specialize, or be a normal object array. Both options would likely be better to avoid the extra overhead ofPartiallyEmptyArray
.To make this work properly, we however like need to revisit mementos/allocation site feedback.
The text was updated successfully, but these errors were encountered: