Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Add fast-path optimization to slow ReadOnlySpan<char>'s ToString#27170

Closed
stephentoub wants to merge 1 commit into
dotnet:masterfrom
stephentoub:slowspan_tostring
Closed

Add fast-path optimization to slow ReadOnlySpan<char>'s ToString#27170
stephentoub wants to merge 1 commit into
dotnet:masterfrom
stephentoub:slowspan_tostring

Conversation

@stephentoub
Copy link
Copy Markdown
Member

If the span wraps a string and represents its full length, just return the original string rather than allocating/copying a new one.

cc: @ahsonkhan, @jkotas

If the span wraps a string and represents its full length, just return the original string rather than allocating/copying a new one.
@ahsonkhan
Copy link
Copy Markdown

This is already covered in this PR: #26880

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants