NetFabric/NetFabric.Hyperlinq

performance optimization for simple objects

Closed this issue · 2 comments

Hi again i noticed that list.first() slower than linq version

image
image

here is the code

using System;
using System.Collections.Generic;
using System.Linq;
using NetFabric.Hyperlinq;

public class Test43 : bs
{
    private static List<int> list = new List<int>() {1, 2, 3, 4};
    
    public void Update()
    {
        
        for (int i = 0; i < 10000; i++)
        {
            var g = list.First(a => a > 3);
//            foreach (var a in g)
//            {
////                var c = g.Max();
//            }
        }
    }
}

actually sorry nevermind, i used deep profile that dont give accurate results, they about the same