Well, the search function you are using I suppose is linear. So if the entry to search is the last one then you have to read all the previous ones. If you are lucky only the first byte should be tested.

I think the best method is to use Binary Search. How this works? Have a google on this and you will see. It has nothing to do with hex/bin/dec!

I don't have right now a running code about this but may be get it to finish in a couple of months.

Ioannis