News for hackers. Stuff that matters.
Re:Classes vs. Structs in .NET. How not to teach about perfo... by progmetaldev on Saturday November 04, 2023 @07:26PM (#38146307)
A lot of LINQ was also optimized and improved with the move to .NET Core (now just .NET). It's definitely important to actually profile the code, rather than just assume LINQ is slow/less-performant. Most of the time, unless the developer has added unneeded code (such as calling .AsEnumerable, or most anything that evaluates the entire collection), the difference between LINQ and standard iterator based code will be nearly non-existent, with some of the cases you mentioned where LINQ has been optimized beyond what a developer can do by hand.

There are no comments on this comment yet.