Skip to content

Revise Array Strategies #246

Open
Open
@smarr

Description

@smarr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImproves the implementation with something noteworthyhelp wantedWould be great if you could help out here.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions