Commit 89f245e
authored
[NRBF] Remove array allocation when decoding
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.decimals. (#107797)1 parent f968980 commit 89f245e
File tree
1 file changed
+1
-9
lines changed- src/libraries/System.Formats.Nrbf/src/System/Formats/Nrbf
1 file changed
+1
-9
lines changedLines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 96 | + | |
105 | 97 | | |
106 | 98 | | |
107 | 99 | | |
| |||
0 commit comments