INLINQ is LINQ but Faster

  • RangeSelectAllQuery.cs
    1
    var query=
    2
        from id in Range(0,length)
    3
        select new TestObject(id, id * 3, 1 + 100 * id).All(x => x.Value > 0);
    4

| Method | LENGTH | BenchmarkMode | Mean | Error | Allocated | |-------------------- |---------- |---------------- |---------------:|--------------:|-------------:| | RangeSelectAllQuery | 1000 | INLINQ_COMPILED | 2.319 us | 0.0087 us | 1.69 KB | | RangeSelectAllQuery | 1000 | INLINQ_RUNTIME | 271.518 us | 3.5873 us | 36.19 KB | | RangeSelectAllQuery | 1000 | LINQ | 165.107 us | 1.0377 us | 49.51 KB | | RangeSelectAllQuery | 10000000 | INLINQ_COMPILED | 7,749.080 us | 2.6807 us | 1.74 KB | | RangeSelectAllQuery | 10000000 | INLINQ_RUNTIME | 7,692.975 us | 5.7517 us | 36.17 KB | | RangeSelectAllQuery | 10000000 | LINQ | 126,162.326 us | 3,223.1488 us | 390635.78 KB | | RangeSelectAllQuery | 100000000 | INLINQ_COMPILED | 16,671.852 us | 38.0391 us | 1.88 KB | | RangeSelectAllQuery | 100000000 | INLINQ_RUNTIME | 16,257.113 us | 32.5687 us | 36.22 KB | | RangeSelectAllQuery | 100000000 | LINQ | 268,602.529 us | 7,012.1931 us | 838871.73 KB |

As you can see, INLINQ is about 15 times faster than LINQ
For small data sets it can be necessary to recompile the LINQ query for maximum performance.

You can use the INLINQ.Examples project to verify our claims yourself.