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

Avoid box allocation in FormatProvider.DateTimeFormat - #1481

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

jkotas merged 1 commit into
dotnet:masterfrom
justinvp:datetimeformat

Conversation

@justinvp

@justinvp justinvp commented Jul 7, 2016

Copy link
Copy Markdown
Contributor

Port dotnet/coreclr#6147 to CoreRT

cc: @jkotas

The current implementation calls `string.Concat(object, object)`, which
results in an `int` box allocation.

Avoid the box allocation by calling `int.ToString()`, allowing
`string.Concat(string, string)` to be used.
@jkotas

jkotas commented Jul 7, 2016

Copy link
Copy Markdown
Member

LGTM. Thanks!

@jkotas
jkotas merged commit d7a2bca into dotnet:master Jul 7, 2016
@justinvp
justinvp deleted the datetimeformat branch July 7, 2016 16:26
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