From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32526 invoked by alias); 28 Nov 2007 16:02:07 -0000 Received: (qmail 32502 invoked by uid 22791); 28 Nov 2007 16:02:05 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.173) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 28 Nov 2007 16:01:59 +0000 Received: by ug-out-1314.google.com with SMTP id o38so1730571ugd for ; Wed, 28 Nov 2007 08:01:56 -0800 (PST) Received: by 10.70.42.18 with SMTP id p18mr3256198wxp.1196265715081; Wed, 28 Nov 2007 08:01:55 -0800 (PST) Received: by 10.70.54.17 with HTTP; Wed, 28 Nov 2007 08:01:55 -0800 (PST) Message-ID: <998d0e4a0711280801p691d0d63i8bae79518df973d8@mail.gmail.com> Date: Wed, 28 Nov 2007 16:06:00 -0000 From: "J.C. Pizarro" To: gcc-help@gcc.gnu.org, "Tom St Denis" Subject: Re: reduce compilation times? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00374.txt.bz2 On 2007/11/28, Tom St Denis 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