Avoid box allocation in DateTimeFormat.FormatCustomized (dotnet/coreclr#6147)
authorJustin Van Patten <jvp@justinvp.com>
Thu, 7 Jul 2016 05:39:34 +0000 (22:39 -0700)
committerJan Kotas <jkotas@microsoft.com>
Thu, 7 Jul 2016 05:39:34 +0000 (07:39 +0200)
commit1429a78a502aee66a1ec5a6580d7ea87c7e37d10
treee64066c2319b8d87f9d3a0ab0ba191d397ef8a07
parent3d80cda80a10f52262bf3dbc016b42bf3bc9749e
Avoid box allocation in DateTimeFormat.FormatCustomized (dotnet/coreclr#6147)

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.

Commit migrated from https://github.com/dotnet/coreclr/commit/62482f58b025eebd05101e33f2d2253fee070ab5
src/coreclr/src/mscorlib/src/System/Globalization/DateTimeFormat.cs