jwilson128 wrote:
> 2) when doing the suggested binary search on IRFcast objects with like
> RateIndex, is there a better way to do it than to cycle through the
> list? something comparable to the SQL logic of SELECT MAX(closedate)
> WHERE closedate<=search date?
>
You don't have to loop through the list. Using a binary seach means that
you use the fact that the list is sorted to rule out half of the list
for each comparison that you do. Finding a value in a list of 1000 items
can be done with just ten comparisons.
http://en.wikipedia.org/wiki/Binary_search_algorithm
--
Göran Andersson
_____
http://www.guffa.com