From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1HamnZ-0007d6-3B for garchives@archives.gentoo.org; Mon, 09 Apr 2007 05:52:17 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l395p0A9021417; Mon, 9 Apr 2007 05:51:00 GMT Received: from lancia.kaluga.ru (mx.kaluga.ru [62.148.128.2]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l395krjr016777 for ; Mon, 9 Apr 2007 05:46:54 GMT Received: from pavillion ([62.148.150.64]) by lancia.kaluga.ru (8.13.8/8.13.8) with ESMTP id l395koB1006034 for ; Mon, 9 Apr 2007 09:46:51 +0400 (MSD) Date: Mon, 09 Apr 2007 09:47:20 +0400 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] CFLAGS "...-O3 -pipe" vs "...O2 " From: "Andrey Gerasimenko" Content-Type: text/plain; format=flowed; delsp=yes; charset=windows-1251 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 References: <739325.15429.qm@web31706.mail.mud.yahoo.com> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <739325.15429.qm@web31706.mail.mud.yahoo.com> User-Agent: Opera Mail/9.10 (Win32) X-Antivirus: avast! (VPS 000731-1, 04/08/2007), Outbound message X-Antivirus-Status: Clean X-Archives-Salt: 620d21d9-5e1e-4d21-866d-c38c6d734ccc X-Archives-Hash: 228f9ee260b5e00648d1e4a66b0a857d On Mon, 09 Apr 2007 05:48:07 +0400, maxim wexler wrote: > Hi group, > > I note two schools of thought on the best CFLAGS for > the Pentium III processor. > > One suggests using -O3 -pipe, the other, -O2 without > the pipe. > > How much difference does this make? Is the extra level > of optimization with pipe the equivalent of the lower > level without? > Man gcc. -pipe allows to use pipes (memory) instead of temporary files (disk). -O controls the resulting binary sometimes making it fast, large, and unreliable. I have seen ebuilds that enforce -O2 even when -O3 is specified. This can create a faulty impression that -O3 always works fine. -O and -pipe interact through the size of temporary files. Theoretically, -pipes may slow down compiles if there is not enough memory. Another factor that should be taken into account is the number of threads for make. For a PIII machine the generally recommended number is 2, but when the RAM is limited, say 384 megs, 1 thread with pipes works better. Ideally you should measure compile times for large projects like Open Office and find out what works best on your system. I would start with 1 thread -O2 and -pipe. -- Andrei Gerasimenko -- gentoo-user@gentoo.org mailing list