|
From: Andre R. <and...@us...> - 2004-11-09 08:56:04
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14161 Modified Files: tablecompare.c Log Message: In tablecomparenames, call compareidentifiers which does an in-place case-insensitive compare. This is much faster than copying both key strings, converting both copies completely to lowercase, and running a case-sensitive compare on the resulting lowercase strings. Index: tablecompare.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablecompare.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tablecompare.c 31 Oct 2004 20:41:10 -0000 1.3 --- tablecompare.c 9 Nov 2004 08:55:55 -0000 1.4 *************** *** 37,41 **** --- 37,51 ---- static short tablecomparenames (hdlhashnode hnode1, hdlhashnode hnode2) { + + /* + 2004-11-09 aradke: optimized by calling compareidentifiers which does + an in-place case-insensitive compare instead of copying both key strings, + converting both copies completely to lowercase, and running a case-sensitive + compare on the resulting lowercase strings. + */ + return (compareidentifiers ((**hnode1).hashkey, (**hnode2).hashkey)); + + /* bigstring bs1, bs2; *************** *** 44,52 **** gethashkey (hnode2, bs2); ! alllower (bs1); /*comparison is unicase*/ alllower (bs2); return (comparestrings (bs1, bs2)); } /*tablecomparenames*/ --- 54,63 ---- gethashkey (hnode2, bs2); ! alllower (bs1); /%comparison is unicase%/ alllower (bs2); return (comparestrings (bs1, bs2)); + */ } /*tablecomparenames*/ |