What LINQ to Objects optimization methods do you use or have seen in the wild?
In anticipation of the โyield foreachโ and other language / compiler optimizations to arrive in C # in 201x, I am interested in doing my best to use LINQ around the world less than a pain in performance.
One of the patterns I've seen so far is to create custom IEnumerable implementations for specific combinators, so an enumerated number is not re-read several times.
performance optimization linq-to-objects
Bent rasmussen
source share