I wrote: [...] > I used the more complicated, shift-based approach because it > guarantees that greater-than/less-than comparisons on the prefix > will yield the same results as strcasecmp on the first 4 bytes. > This makes it possible to use the prefix in the comparator > function in the big qsort in apr_table_overlap, which does > a *lot* of strcasecmp calls otherwise. hmmm...I'm having second thoughts about optimizing the prefix design for apr_table_overlap. Rather than trying to eliminate strcasecmp calls within the qsort, it may be better to eliminate the qsort altogether. I have an idea for how to do this...if it works, we can use Cliff's faster prefix code for get/set operations and still speed up apr_table_overlap. If all goes well, I'll post an updated patch later this weekend. --Brian