Skip to content

Conversation

@stephentoub
Copy link
Member

No description provided.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@tannergooding tannergooding left a comment

Choose a reason for hiding this comment

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

This means many of these become stackallocs and now use the params ROSpan<T> overloads, correct?

@stephentoub
Copy link
Member Author

This means many of these become stackallocs and now use the params ROSpan overloads, correct?

For this particular round of changes, most if not all of the cases I converted were target typed to T[], so the collection expressions are still forced to produce an array. However, for any where the target type was instead span, or where it is an argument to a method that has an overload that takes a span instead, then the compiler will do better, either using stack allocation or using assembly data if all elements were constant and the target is read only.

@stephentoub
Copy link
Member Author

stephentoub commented Jul 19, 2024

/ba-g unknown failure was a wasi leg not running a test

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants