Fast look-up algorithms - C#