ToSpan for Linq? #59826
Replies: 2 comments 9 replies
-
|
Beta Was this translation helpful? Give feedback.
-
What makes you think that the cases where the (usually not so great) performance of LINQ is acceptable, but the fairly small difference between (I realize that I am somewhat repeating the previous discussion, but I though explicitly asking like this is still worthwhile.) Especially consider that if it does often make a difference in your codebase, you can easily write this one-liner extension method yourself. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I think it might be useful to have method ToSpan for Linq. It will not add a copy overhead like there is in
.ToArray()
, as it will be a span of the list's internal array. So essentially it would be<=>
So it behaves similarly to
ToArray()
, but fits high-perf scenarios better.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions