[API Proposal]: Provide public implementation to sort IList<T> instances in place #101883
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Collections
Uh oh!
There was an error while loading. Please reload this page.
Background and motivation
.NET has a great implementations and public APIs for in place sorting of List<>, Array and Span.
Even more code used by these public APIs is internal/private.
Would be great to reuse the same algorithms (and code when possible) for in place sorting of any IList implementation.
In-place sorting is needed to avoid excessive memory allocations.
Of course, resulting performance will not be as optimal as direct Span/Array sorting and will be highly dependent on concrete IList<> implementation, but at least it [in most of the cases] will be better than most of [quick] implementations made by developers in their codebases.
API Proposal
API Usage
The text was updated successfully, but these errors were encountered: