Linq works faster ?
How Linq query works faster than foreach/for loop ?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hassan Uddin MughalRank #2,508 · 560 reputationPosted May 23, 2017, 9:59 PM EDT
Most of the times, LINQ will be a bit slower because it introduces overhead. Do not use LINQ if you care much about performance. Use LINQ because you want shorter better readable and maintainable code. LINQ might be get faster at some point. The good thing about LINQ is that that you don't have to care about how it works. If a new method is thought up that's incredibly fast, the people at Microsoft can implement it without even telling you and your code would be a lot faster. More importantly though, LINQ is just much easier to read. That should be enough reason.