From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21620 invoked by alias); 9 Mar 2010 03:43:53 -0000 Received: (qmail 21608 invoked by uid 22791); 9 Mar 2010 03:43:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-gx0-f216.google.com (HELO mail-gx0-f216.google.com) (209.85.217.216) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Mar 2010 03:43:48 +0000 Received: by gxk8 with SMTP id 8so3165799gxk.9 for ; Mon, 08 Mar 2010 19:43:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.90.7.29 with SMTP id 29mr5801722agg.16.1268106226317; Mon, 08 Mar 2010 19:43:46 -0800 (PST) In-Reply-To: <7088dd691003081931w2a9c6618of759c34753b5ac8b@mail.gmail.com> References: <7088dd691003081924l2c75ec98tca557585304a9e73@mail.gmail.com> <7088dd691003081931w2a9c6618of759c34753b5ac8b@mail.gmail.com> From: me22 Date: Tue, 09 Mar 2010 03:43:00 -0000 Message-ID: Subject: Re: -O more than the sum of its parts? To: drew stortz Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 2010-03/txt/msg00109.txt.bz2 On 8 March 2010 22:31, drew stortz wrote: > > However, experiment tells me that this is far from true.=C2=A0 When I > compile the same c file both ways, the object file produced with -O is > around 20% smaller than the one produced with all of the individual > optimizations added. =C2=A0Before filing a bug or investigating further, I > wanted to ask the list: is my interpretation of the -O switch > incorrect?=C2=A0 Is it more than just the sum of those individual > optimizations? > Yes; My understanding is that all of the -O levels have features not controllable with individual flags.