bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Global-commit] global global/global.c libutil/gtagsop.c libuti...


From: Shigio YAMAGUCHI
Subject: Re: [Global-commit] global global/global.c libutil/gtagsop.c libuti...
Date: Sun, 03 Dec 2006 20:37:57 +0900

> 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 <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]