-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Replace occurrences of params T[] with params ReadOnlySpan<T> where possible #9481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
714abef
to
1217ef8
Compare
I have fixed the merge conflict and rebased. |
1217ef8
to
10775f7
Compare
Resolved merge conflicts 09 |
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VisualStates.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Commands/CommandHelpers.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM. @h3xds1nz, the changes can be taken in after resolving the conflicts.
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VisualStates.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/VisualStateGroup.cs
Show resolved
Hide resolved
…pan<InputGesture>
10775f7
to
c451e92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving post conflict resolution.
Thanks @h3xds1nz for the contribution. |
@harshit7962 Thanks, this one is big. |
Description
Continues the journey that started in #9468 and converts some internal call-chains from
params T[]
toparams ReadOnlySpan<T>
where I felt it is without any side-effects, largely decreasing allocations in other scenarios besides just tracing and improving both performance and allocations since we do not need to create a new heap array ofT[]
everytime.Simple benchmark with 0, 1, and 3 params
Benchmark code
Customer Impact
Improved performance, decreased allocations.
Regression
No.
Testing
Local build, test app run.
Risk
Low.
Microsoft Reviewers: Open in CodeFlow