Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Avoid unnecessary allocations in BlockedRuntimeTypeNameGenerator - #1482

Merged
jkotas merged 1 commit into
dotnet:masterfrom
justinvp:typenamegenerator
Jul 7, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
justinvp:typenamegenerator

Conversation

@justinvp

@justinvp justinvp commented Jul 7, 2016

Copy link
Copy Markdown
Contributor

The current implementation calls string.Concat(object[]), which results in an unnecessary uint box allocation along with an unnecessary object[] array allocation.

These allocations can be avoided by calling uint.ToString(), allowing string.Concat(string, string, string, string) to be used.

The current implementation calls `string.Concat(object[])`, which
results in an unnecessary `uint` box allocation along with an
`object[]` array allocation.

These allocations can be avoided by calling `uint.ToString()`, allowing
`string.Concat(string, string, string, string)` to be used.
@jkotas

jkotas commented Jul 7, 2016

Copy link
Copy Markdown
Member

LGTM. Thanks!

@jkotas
jkotas merged commit 62e48db into dotnet:master Jul 7, 2016
@justinvp
justinvp deleted the typenamegenerator branch July 7, 2016 21:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants