Вue to de-abstraction feature in .NET 10 we can eliminate all the overhead in the existing cases.
For instance, if you have Enumerable.Any with a delegate that captures instance state, the runtime can stack-alloc it, and (if it's small) to inline it. This will achieve the performance of a manual code that obtains span out of a list and "inlines" the delegate logic into the loop itself!
GOPbIHbI4•2h ago
For instance, if you have Enumerable.Any with a delegate that captures instance state, the runtime can stack-alloc it, and (if it's small) to inline it. This will achieve the performance of a manual code that obtains span out of a list and "inlines" the delegate logic into the loop itself!