This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: reduce compilation times?
- From: "J.C. Pizarro" <jcpiza at gmail dot com>
- To: gcc-help at gcc dot gnu dot org, "Tom St Denis" <tstdenis at ellipticsemi dot com>
- Date: Wed, 28 Nov 2007 17:01:55 +0100
- Subject: Re: reduce compilation times?
On 2007/11/28, Tom St Denis <tstdenis@ellipticsemi.com> wrote:
> As I said in my first post on the subject, there is no "hard set"
> rule about when to refactor. If your class has 3 methods and
> is 75 lines of code, it's probably better to have it all organized
> in one unit/file. But if your class has 15 methods, and requires
> 1500 lines of code, you're probably better off refactoring it.
Well, and how is this GCC in reality?
svn://gcc.gnu.org/svn/gcc/trunk
$ svn info
...
Revision: 130486
...
Last Changed Date: 2007-11-28 02:09:35 +0100 (Wed, 28 Nov 2007)
find . -type f -iregex '.*\.c.*\|.\*.h.*' | grep -v '\.svn' | xargs ls -l | \
tr -s ' ' | cut -d' ' -f5,8 | sort -nr | head -200 | cut -d' ' -f2 | \
while read F ; do wc -l "$F" ; done | sort -nr | head -20 | awk \
'{ printf substr($2,3) ":\t\t" $1 " lines, " ; \
system("echo -n $(ls -l " $2 " | tr -s \\\\040 \\\\t | cut -f5)") ; \
print " bytes." }'
Here is the list of the 20 first big files (sorted by KLOCs):
libgcc/config/libbid/bid_binarydecimal.c: 147484 lines,
6403812 bytes.
gcc/config/i386/i386.c: 25308 lines, 815664 bytes.
libjava/gnu/gcj/convert/Unicode_to_JIS.cc: 23139 lines,
625205 bytes.
gcc/config/rs6000/rs6000.c: 21799 lines, 689671 bytes.
gcc/cp/parser.c: 20557 lines, 626246 bytes.
gcc/config/arm/arm.c: 18711 lines, 549174 bytes.
libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc:
17196 lines, 823435 bytes.
gcc/cp/pt.c: 16087 lines, 501737 bytes.
gcc/fold-const.c: 15206 lines, 482273 bytes.
gcc/dwarf2out.c: 14990 lines, 453585 bytes.
gcc/combine.c: 13041 lines, 429100 bytes.
gcc/builtins.c: 13026 lines, 397350 bytes.
gcc/config/mips/mips.c: 12531 lines, 393171 bytes.
gcc/cp/decl.c: 12341 lines, 386701 bytes.
gcc/config/sh/sh.c: 10932 lines, 329618 bytes.
gcc/config/alpha/alpha.c: 10727 lines, 294299 bytes.
libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc:
10116 lines, 391467 bytes.
gcc/expr.c: 10102 lines, 317028 bytes.
gcc/config/ia64/ia64.c: 9970 lines, 294743 bytes.
gcc/config/frv/frv.c: 9594 lines, 285369 bytes.
They are between 147.4 and 9.5 Klines in comparison
to 1.5 Klines of code that you wish.
There is much work to refactor the GCC's {.c/.h} sources.
J.C.Pizarro