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

DateTimeFormat: Avoid intermediate char[] allocation - #6863

Merged
jkotas merged 1 commit into
dotnet:masterfrom
justinvp:datetimeformat_char
Aug 24, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
justinvp:datetimeformat_char

Conversation

@justinvp

Copy link
Copy Markdown

An unnecessary intermediate char[] allocation can be avoided by calling new string(c, 1) instead of new string(new char[] { c }).

An unnecessary intermediate char[] allocation can be avoided by calling
`new string(c, 1)` instead of `new string(new char[] { c })`.
@stephentoub

Copy link
Copy Markdown
Member

LGTM

@jkotas

jkotas commented Aug 23, 2016

Copy link
Copy Markdown
Member

@dotnet-bot test Windows_NT x64 Release Priority 1 Build and Test please

@jkotas

jkotas commented Aug 23, 2016

Copy link
Copy Markdown
Member

@dotnet-bot test Windows_NT x86 ryujit Checked Build and Test please

@jkotas

jkotas commented Aug 24, 2016

Copy link
Copy Markdown
Member

@jkotas
jkotas merged commit d014a8f into dotnet:master Aug 24, 2016
@jkotas

jkotas commented Aug 24, 2016 •

Copy link
Copy Markdown
Member

@justinvp Could you please port the fix to CoreRT as well? Thanks!

@justinvp

Copy link
Copy Markdown
Author

@jkotas, already preemptively ported: dotnet/corert#1710

@justinvp
justinvp deleted the datetimeformat_char branch August 24, 2016 05:55
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…6863)

An unnecessary intermediate char[] allocation can be avoided by calling
`new string(c, 1)` instead of `new string(new char[] { c })`.

Commit migrated from dotnet/coreclr@d014a8f
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