Benchmarks comparing the performance of LINQ against for
/foreach
loops and the following libraries:
- Faslinq
- Cistern.ValueLinq
- JM.LinqFaster
- LinqFasterer
- LinqAF
- SpanLinq
- StructLinq
- NetFabric.Hyperlinq
- System.Linq.Async
NOTE: Removed LinqOptimizer and Streams from the benchmarks as they are slower than LINQ on every benchmark.
- Range()
- Range().Select()
- Range().Select().ToArray()
- Range().Select().ToList()
- Range().ToArray()
- Range().ToList()
- enumerable.Contains()
- enumerable.Distinct()
- enumerable.Select()
- enumerable.Skip().Take().Select()
- enumerable.Skip().Take().Where()
- enumerable.Sum()
- enumerable.Where()
- enumerable.Where().Count()
- enumerable.Where().Select()
- enumerable.Where().Select().ToArray()
- enumerable.Where().Select().ToList()
- array.Contains()
- array.Distinct()
- array.Select()
- array.Select().ToList()
- array.Skip().Take().Select()
- array.Skip().Take().Where()
- array.Sum()
- array.Where()
- array.Where().Count()
- array.Where().Select()
- array.Where().Select().ToArray()
- array.Where().Select().ToList()
- array.Contains()
- array.Distinct()
- array.Select()
- array.Select().Sum()
- array.Skip().Take().Select()
- array.Skip().Take().Where()
- array.Where()
- array.Where().Count()
- array.Where().Select()
- array.Where().Select().ToArray()
- array.Where().Select().ToList()
- list.Contains()
- list.Distinct()
- list.Select()
- list.Select().ToList()
- list.Skip().Take().Select()
- list.Skip().Take().Where()
- list.Sum()
- list.ToArray()
- list.Where()
- list.Where().Select()
- list.Where().Select().ToArray()
- list.Where().Select().ToList()