SOMns icon indicating copy to clipboard operation
SOMns copied to clipboard

Revise Array Strategies

Open smarr opened this issue 7 years ago • 0 comments

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

./debug -i -t1 -at -TF -sid -EG core-lib/Benchmarks/AsyncHarness.ns Savina.ForkJoinActorCreation 1000 0 40000

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 of PartiallyEmptyArray.

To make this work properly, we however like need to revisit mementos/allocation site feedback.

smarr avatar Apr 26 '18 16:04 smarr