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

Michael Sweet mike at easysw.com
Wed Apr 25 12:56:04 PDT 2007


[STR Closed w/Resolution]

I implemented, tested, and then discarded a variable-size hash array change
for the current branch (look at r6474 for the variable-size hash and r6475
for the fixed-size hash).  In the end, there was a pretty consistent
performance loss for the variable-size hash due to the extra overhead
associated with the lookups and resizing.

The current code in the hasharray branch provides the following average
speedups over my test sample of 924 PPDs with at least one constraint:

    System         vs 1.1.23  vs 1.2.10
    -------------  ---------  ---------
    Linux P4 Xeon      1.58x      3.48x
    Linux Pent M       2.30x      2.46x
    Mac G5             5.38x      4.32x
    Mac Core Duo       3.47x      3.02x

As for adding a hash for the choices, my testing showed it was a net loser
when combined with the current ppdConflicts() changes.

Anyways, I've merged the hasharray changes to trunk; if you see other
opportunities for optimization, please let me know...

Link: http://www.cups.org/str.php?L2358
Version: 1.3-feature
Fix Version: 1.3-current (r6477)





More information about the cups-devel mailing list