> The version that use strhash is the fastest in normal usage as you say.
Your code is a little disadvantageous when a project is large and
the result is small. Oppositely, it is not deteriorated even in
the worst.
CVS version your patch
------------------------------------------------------------------
small project o o
large project and small result o x
large project and large result x o
------------------------------------------------------------------
The difference between two seems to be rather in sort method.
The CVS version uses internal sort, and your patch uses GPATH.
How about combining the two like this?
if (number of lines of the result > RESULT_THRESHOLD)
/* use GPATH */
else
/* use internal sort */
The value of RESULT_THRESHOLD might be about 1000(???).
--
Shigio YAMAGUCHI <[EMAIL PROTECTED]> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3
_______________________________________________
Bug-global mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-global