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

Reduce number of branches and IL size of string.Trim/TrimEnd/TrimStart methods #9115

Merged
merged 1 commit into from
Jan 26, 2017

Conversation

justinvp
Copy link

@justinvp justinvp commented Jan 25, 2017

At the point where we use fixed, we already know the char[] is not null or empty, so we can reduce the number of branches and overall size of the method body by using the address of the first element. Based on the discussion here: dotnet/corefx#15432 (comment)

cc: @stephentoub, @jkotas

@justinvp
Copy link
Author

@dotnet-bot test OSX x64 Checked Build and Test
@dotnet-bot test Ubuntu x64 Checked Build and Test
@dotnet-bot test Windows_NT x64 Release Priority 1 Build and Test

@jkotas
Copy link
Member

jkotas commented Jan 25, 2017

Thanks!

@justinvp
Copy link
Author

@dotnet-bot test Ubuntu x64 Checked Build and Test (Failure to restore a package)

@justinvp
Copy link
Author

@dotnet-bot test OSX x64 Checked Build and Test (Failed to restore the package)

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