Skip to content

Removing Linq Usage #45060

Answered by stephentoub
TonyValenti asked this question in Q&A
Nov 21, 2020 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

LINQ to Objects is great for productivity and succinctly expressing intent. It's not great for high performance, incurring overheads like allocations for delegates and closures, delegate invocations per element, multiple interface dispatch per element, type checks, decreased opportunity for JIT optimization, etc. For code where performance is paramount, such as in dotnet/runtime, it's better to avoid most of LINQ.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@TonyValenti
Comment options

@stephentoub
Comment options

@ShreyasJejurkar
Comment options

@stephentoub
Comment options

@ShreyasJejurkar
Comment options

Answer selected by stephentoub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants