Green Leaf
Green Leaf
CC#
Created by Green Leaf on 12/19/2024 in #help
Why lambda is faster than other approaches?
I've been working on some algorithm and discovered that if the Sort function uses a lambda comparer, it is faster than if it uses a comparer type. So I run this test with BenchmarkDotNet and the result really puzzles me. Why is that? https://gist.github.com/laicasaane/d51193a0a4aff7c6df6c1bb89a66bdc9
10 replies