To LINQ Or Not To LINQ - That is the Question

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: https://github.com/matlus/VariousBenc...