If you want to make it 4096 entries, you could step through the table with
binary search very cheap by shifting a mask on each pass. I would already
think about it with 35 entries... ;-)


On 21 October 2013 13:32, Dougie Lawson <[email protected]> wrote:

> If I have a table of 3,500 entries of twelve bytes (I'm doing a compare of
> eight bytes to find the entry I'm looking for and a check on a half word
> marker for the end of the table to avoid running off the end) then is it
> worth the pain of re-writing it as a binary search.
>
> If it is worth the pain and does anyone have a sample binary search tucked
> away.
>
> The table is built into a CSECT at the bottom of my code. I can restructure
> it if we need any special pointers to make a binary search work.
>
> Dougie
>

Reply via email to