This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Remove a small allocation in MethodBase.ToString()#25631
Merged
jkotas merged 1 commit intodotnet:masterfrom Aug 28, 2019
Merged
Remove a small allocation in MethodBase.ToString()#25631jkotas merged 1 commit intodotnet:masterfrom
jkotas merged 1 commit intodotnet:masterfrom
Conversation
Member
|
Why not just make the primitives, void, etc. take the IsNested path that just returns the Name? We could get rid of the Substring completely. |
Member
Author
|
@MichalStrehovsky oh, indeed, however maybe it make sense to keep that fast path for "Void"? |
Member
Author
|
Moved to the shared partitions in order to re-use it from Mono |
Member
Why? |
jkotas
reviewed
Jul 11, 2019
Member
Author
|
Removed fast path for void. |
jkotas
approved these changes
Jul 11, 2019
filipnavara
approved these changes
Jul 11, 2019
justinvp
reviewed
Jul 14, 2019
Member
|
@EgorBo Could you please resolve the conflict? |
Member
Author
|
@jkotas oh, sure! |
088c2d9 to
8c4e27a
Compare
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/corefx
that referenced
this pull request
Aug 28, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/corert
that referenced
this pull request
Aug 28, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/mono
that referenced
this pull request
Aug 28, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
stephentoub
pushed a commit
to dotnet/corefx
that referenced
this pull request
Aug 28, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas
pushed a commit
to dotnet/corert
that referenced
this pull request
Aug 29, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
vargaz
pushed a commit
to mono/mono
that referenced
this pull request
Sep 2, 2019
* Move FormatTypeName to Type (dotnet/coreclr#25631) Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com> * Fix for mono
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
Commit migrated from dotnet/coreclr@f07c13c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't call
base.ToString()andSubstringif the type is void (the most popular return type I guess).Before:
3792 bytesAfter:
3592 bytesI know the ToString() for methods is cached so this optimization affects only first calls of methodBase.ToString().