Chris Green chris@areti.co.uk writes:
I think I can ensure the table is sorted, the code will probably be generated from a non-assembler source in some sort of format so that processing can sort it as well.
You could generate a perfect hash function for the data using gperf or similar.
The 'messy boundary conditions' are handling things like what to do when finding the middle of a table with an odd number of entries etc.
I always round down since that's the most convenient to write.