I have the following code to find a match for a number in a list of ranges.
public class RangeGroup { public uint RangeGroupId { get; set; } public u
If you populate the list only once you can do a magic trick:
Sort takes O(Nlog(N)) time and is only done once. Binary search takes O(log(N)), which takes at most 17 comparisons for 100.000 items.