Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Proposal: Add ReadOnlySpan<T> overload for List<T> AddRange and InsertRange #1517

Closed
rabbitism opened this issue Jan 9, 2020 · 2 comments

Comments

@rabbitism
Copy link

public void AddRange(ReadOnlySpan<T> span)
{
}

public void InsertRange(int index, ReadOnlySpan<T> span)
{
}

By Adding this API, it eliminates one extra step of copying span elements into a new array.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Memory untriaged New issue has not been triaged by the area owner labels Jan 9, 2020
@rabbitism rabbitism changed the title API Proposal: Add ReadOnlySpan<T> support for List<T> AddRange and InsertRange API Proposal: Add ReadOnlySpan<T> overload for List<T> AddRange and InsertRange Jan 9, 2020
@eerhardt
Copy link
Member

eerhardt commented Jan 9, 2020

Looks like a duplicate of https://github.com/dotnet/corefx/issues/36198.

@safern
Copy link
Member

safern commented Jan 9, 2020

Closing as dupe of: #1530

@rabbitism if you're interested on this, please add your motivations on that issue to push it through.

@safern safern closed this as completed Jan 9, 2020
@eiriktsarpalis eiriktsarpalis removed the untriaged New issue has not been triaged by the area owner label Jul 7, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants