On Mon, Nov 12, 2001 at 10:02:43AM -0800, Brian Pane wrote: >... > By the way, I have an alternate implementation of a > table speedup that I wrote late yesterday. It caches > a 32-bit checksum for each key in the table and compares > checksums to decide whether it can skip the strcasecmp. > It's still O(n), but the idea is to reduce the constant > multiplier. (The checksum computation basically just > packs the first four bytes of the string into an int and > does some bit masking to normalize to all-uppercase.
The bit masking won't work on EBCDIC machines. Cheers, -g -- Greg Stein, http://www.lyra.org/
