[cups.development] [RFE] STR #2358:ppdFindOption()performanceimprovement using hash table lookup

Michael Sweet mike at easysw.com
Fri Apr 27 04:43:28 PDT 2007


Hidetomo Katsura wrote:
>> I'll make sure to update the code to do a toupper (tolower spreads
>> the letters away from the numbers, which reduces the effectiveness
>> of the hash...)
> 
> thanks. that makes sense.
> 
> just make sure you don't do that "toupper" in the hash value generator.
> 
> toupper only needs to be done once per case-insensitive string.

No, again, we MUST continue using the mixed-case strings in ppd_file_t,
so we MUST do the toupper() in the hashed lookup (or not at all, given
that we'll fall back on the strcasecmp() to verify the hash anyways...)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups-devel mailing list