I was wondering which data structure would offer me better performance for my scenario.... My requirements are: Possible Huge DataSet several million of records, I am going to write it only once and I am not going to change it any more during the execution lifetime, I don t need that it is stored in a sorted way.... I was thinking to go with List but if I use a Linq query and in the where condition call InRange performance are very bad... if I do a foreach, performance are not so great.... I am pretty sure that there is a best way to do it ( I was thinking to use a struct and or implement IEquatable but performance are not improving... witch is the quickest data structure in C# for querying in my range with optimal performances? What I want is a data structure to store several million of instances of the class Rnage
class Range
{
public int Low {get; set;}
public int High {get; set;}
public bool InRange(int val) { return val >= Low && val <= High; }
}
A logic example would be List but I am afraid that List class is not optimized for my requirements... since it is sorted and I don t need sorting and it affect a lot on performances...
感谢帮助!