From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20964 invoked by alias); 27 Nov 2007 16:07:18 -0000 Received: (qmail 20630 invoked by uid 22791); 27 Nov 2007 16:07:16 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Nov 2007 16:07:11 +0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1Ix2xh-0006eN-7B; Tue, 27 Nov 2007 16:07:01 +0000 Message-ID: <474C40A5.E91823DD@dessent.net> Date: Tue, 27 Nov 2007 16:19:00 -0000 From: Brian Dessent Reply-To: gcc-help@gcc.gnu.org X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: "J.C. Pizarro" CC: Sven Eschenberg , gcc-help@gcc.gnu.org Subject: Re: reduce compilation times? References: <998d0e4a0711270748x224a16d5ye84fc0eae5ac90d5@mail.gmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00302.txt.bz2 "J.C. Pizarro" wrote: > * to use -O3 -fomit-frame-pointer -funroll-loops -finline-functions -fpeel-loops This is exactly the opposite of what you should do if you're trying to reduce compile time. -O3 includes marginal optimizations that increase compile time and usually do not have substantial benefit. -O2 is meant as a balance between decent optimization and compile speed. If you want faster compile speed then you use -O1 or -O0, or (sadly) use an older version of gcc. You certainly don't tell the compiler to try wild and crazy stuff, just like you don't use gzip -9 if compression speed matters. > * to use SSE2/SSE/AltiVec (SSE3 is little bit slower) > * to disable shared (it reduces linking time and paging time), to > enable -static. > * to recompile the shared libraries (that it depends) to static libraries. > * to disable threads (they reduce I/O bandwith) if the program > doesn't require threading > * to disable checking (-DNDEBUG) > * to modify optimizing their sources after profiled the runned > testsuite (-pg, gprof) These all have to do with runtime performance, not compile time. Please, read the question. Brian