Skip to content

Implement SegmentedArray<T>#43502

Merged
sharwell merged 7 commits intodotnet:masterfrom
sharwell:segmented-array
Jun 11, 2020
Merged

Implement SegmentedArray<T>#43502
sharwell merged 7 commits intodotnet:masterfrom
sharwell:segmented-array

Conversation

@sharwell
Copy link
Contributor

@sharwell sharwell commented Apr 20, 2020

Implements SegmentedArray<T>, which is intended to serve as a replacement for T[] that does not place objects in the Large Object Heap. More complex data types (e.g. a replacement for List<T> or Dictionary<TKey, TValue>) could be implemented on top of this type.

@sharwell sharwell marked this pull request as ready for review April 22, 2020 16:32
@sharwell sharwell requested a review from a team as a code owner April 22, 2020 16:32
@CyrusNajmabadi
Copy link
Contributor

Done with pass.

@CyrusNajmabadi
Copy link
Contributor

i see. you're thinking about this as a bulding block piece. In htat case i like it a lot more. But it would be nice to see how htat would work. i.e. how a SegmentedList would use SegmentedArray to make a variable length construct.

@sharwell
Copy link
Contributor Author

... how a SegmentedList would use SegmentedArray to make a variable length construct.

It's exactly the same as how List<T> is implemented against T[]. Either way it'll be coming shortly.

Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Note: i didn't check any of hte math/shifting/bit-operations. I presume the tests are sufficient to validate here :)

@sharwell
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@sharwell sharwell merged commit d3298d8 into dotnet:master Jun 11, 2020
@ghost ghost added this to the Next milestone Jun 11, 2020
@sharwell sharwell deleted the segmented-array branch June 11, 2020 16:40
@dibarbet dibarbet modified the milestones: Next, 16.7.P4 Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants