To LINQ Or Not To LINQ - That is the Question @Matlus
To LINQ Or Not To LINQ - That is the Question  @Matlus
Uploaded March 2021 | Updated November 2026, 3 hours ago
Programming With Intent chapters: matlus.com/pwi LINQ introduces inefficiencies in the form of hidden allocations. The C# Team's coding guidelines say:
1. Avoid LINQ
2. Avoid using foreach over collections that do not have a struct enumerator
3. Consider using an object pool. There are many usages of object pools in the compiler to see an example

Having a good understanding what LINQ is does internally should yield enough information to know whether you are taking a performance hit. LINQ, as a built-in technology, has performance advantages and disadvantages. The code behind the extension methods has had considerable performance attention paid to it by the .NET team.

The code shown in this video can be found here:
github.com/matlus/VariousBenchmarks More articles and Programming With Intent chapters: matlus.com

Read the article: matlus.com/writing/to-linq-or-not-to-linq
To LINQ Or Not To LINQ - That is the QuestionCustom AttributesPuppeteer # Automating a Browser..Azure Service Bus - Getting StartedIntroduction to Cosmos DB - Containers, Partition Keys & RUs.Net Memory Allocations and Performance - Part 2So you want to be a Code Reviewer? #4 - Code ReviewShiv Kumar Live StreamFactory PatternSo You Think You Know C#? ConstructorsLogging And Application Insights in Non-ASP.NET ApplicationsSo You Think You Know C#? - Static classes
Shiv Kumar |

To LINQ Or Not To LINQ - That is the Question

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER