Skip to content

Conversation

@teo-tsirpanis
Copy link
Contributor

By directly passing a collection expression to decimal's constructor, we avoid allocating an array on frameworks that have an overload that accepts a ReadOnlySpan<int>, in which case the span's memory is allocated on the stack.

By directly passing a collection expression to `decimal`'s constructor, we avoid allocating an array on frameworks that have an overload that accepts a `ReadOnlySpan<int>`, in which case the span's memory is allocated on the stack.
@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 13, 2024
@teo-tsirpanis teo-tsirpanis added area-System.Formats.Nrbf and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 13, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 13, 2024
Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @teo-tsirpanis !

@adamsitnik adamsitnik merged commit 89f245e into dotnet:main Sep 20, 2024
@teo-tsirpanis teo-tsirpanis deleted the patch-1 branch September 22, 2024 20:07
sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
By directly passing a collection expression to `decimal`'s constructor, we avoid allocating an array on frameworks that have an overload that accepts a `ReadOnlySpan<int>`, in which case the span's memory is allocated on the stack.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Formats.Nrbf community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants