On Sun, 03 Dec 2006 20:37:57 +0900, Shigio YAMAGUCHI wrote... > 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 */
When a project is large, most of the execution time is spent for the pooling. The switching after pooling seems too late. This was measured using "2006-12-02 0:00 JST" version. $ ls linux-2.0.40 linux-2.2.26 linux-2.4.33 linux-2.6.19 $ foreach dir ( * ) foreach? echo === $dir === foreach? foreach opt ( '' '-r' '-s' ) foreach? (cd $dir; unsetenv GTAGSCACHE; time global $opt '.*' >/dev/null) foreach? end foreach? end === linux-2.0.40 === pool: 0.035313s sort: 0.001727s 0.036u 0.004s 0:00.04 75.0% 0+0k 0+0io 0pf+0w pool: 0.049168s sort: 0.001615s 0.040u 0.012s 0:00.05 100.0% 0+0k 0+0io 0pf+0w pool: 0.056144s sort: 0.001506s 0.048u 0.012s 0:00.06 83.3% 0+0k 0+0io 0pf+0w === linux-2.2.26 === pool: 0.125180s sort: 0.004610s 0.124u 0.012s 0:00.12 108.3% 0+0k 0+0io 0pf+0w pool: 0.241891s sort: 0.004626s 0.228u 0.024s 0:00.24 100.0% 0+0k 0+0io 0pf+0w pool: 0.278062s sort: 0.004371s 0.216u 0.032s 0:00.28 85.7% 0+0k 0+0io 0pf+0w === linux-2.4.33 === pool: 0.464946s sort: 0.011626s 0.396u 0.088s 0:00.48 97.9% 0+0k 0+0io 0pf+0w pool: 1.258450s sort: 0.011654s 1.204u 0.076s 0:01.27 100.0% 0+0k 0+0io 0pf+0w pool: 0.954396s sort: 0.010519s 0.908u 0.064s 0:00.97 98.9% 0+0k 0+0io 0pf+0w === linux-2.6.19 === pool: 1.115000s sort: 0.021195s 1.060u 0.088s 0:01.14 100.0% 0+0k 0+0io 0pf+0w pool: 3.748531s sort: 0.021054s 3.676u 0.104s 0:03.78 99.7% 0+0k 0+0io 0pf+0w pool: 2.945058s sort: 0.019107s 2.908u 0.068s 0:02.97 99.6% 0+0k 0+0io 0pf+0w ---- Hideki IWAMOTO [EMAIL PROTECTED]
test.patch
Description: Binary data
_______________________________________________ Bug-global mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-global
