You forgot to reset the Stopwatch after foreach
More Related Contents:
- Is a LINQ statement faster than a ‘foreach’ loop?
- Where is likely the performance bug here? [closed]
- Update all objects in a collection using LINQ
- Performance difference for control structures ‘for’ and ‘foreach’ in C#
- LINQ Ring: Any() vs Contains() for Huge Collections
- LINQ: Not Any vs All Don’t
- For vs. Linq – Performance vs. Future
- Why is LINQ .Where(predicate).First() faster than .First(predicate)?
- How do I segment the elements iterated over in a foreach loop
- Performance of Find() vs. FirstOrDefault() [duplicate]
- Why is Parallel.ForEach much faster then AsParallel().ForAll() even though MSDN suggests otherwise?
- Linq style “For Each” [duplicate]
- Does the order of LINQ functions matter?
- LINQ performance FAQ
- Performance of Skip (and similar functions, like Take)
- Dynamic where clause (OR) in Linq to Entities
- Paging with LINQ for objects
- Pivot data using LINQ
- Optimal LINQ query to get a random sub collection – Shuffle
- Searching a tree using LINQ
- How can I get LINQ to return the object which has the max value for a given property? [duplicate]
- Detecting network connection speed and bandwidth usage in C#
- C# Linq intersect/except with one part of object
- Entity-framework code is slow when using Include() many times
- Linq to Objects – return pairs of numbers from list of numbers
- From Eric Lippert’s blog: “don’t close over the loop variable” [duplicate]
- Possible to iterate backwards through a foreach?
- Add the where clause dynamically in Entity Framework
- Split a List into groups of consecutive numbers [closed]
- How to include() nested child entity in linq