public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Steve Snyder <swsnyder@insightbb.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Testing optimize-for-size suitability?
Date: Wed, 19 Jan 2005 05:17:39 +0100	[thread overview]
Message-ID: <20050119041739.GI1841@stusta.de> (raw)
In-Reply-To: <200501161040.12907.swsnyder@insightbb.com>

On Sun, Jan 16, 2005 at 10:40:12AM -0500, Steve Snyder wrote:
> Is there a benchmark or set of benchmarks that would allow me to test the 
> suitability of the CONFIG_CC_OPTIMIZE_FOR_SIZE kernel config option?
> 
> It seems to me that the benefit of this option is very dependant on the 
> amount of CPU cache installed, with the compiler code generation being a 
> secondary factor.  The use, or not, of CONFIG_CC_OPTIMIZE_FOR_SIZE is 
> basically an act of faith without knowing how it impacts my particular 
> environment.
> 
> I've got a Pentium4 CPU with 512KB of L2 cache, and I'm using GCC v3.3.3.  
> How can I determine whether or not CONFIG_CC_OPTIMIZE_FOR_SIZE should be 
> used for my system?
> 
> Thanks.

In theory, -O2 should produce faster code.

In practice, I don't know about any recent benchmarks comparing -Os/-O2 
kernels.

In practice, I doubt it would make any noticable difference if the 
kernel might be faster by let's say 1% with one option compared to the 
other one.

The main disadvantage of -Os is that it's much less tested for kernel 
compilations, and therefore miscompilations are slightly more likely.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  parent reply	other threads:[~2005-01-19  4:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-16 15:40 Testing optimize-for-size suitability? Steve Snyder
2005-01-16 15:46 ` Arjan van de Ven
2005-01-16 20:18   ` Rogério Brito
2005-01-19  4:17 ` Adrian Bunk [this message]
2005-01-19  5:14   ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050119041739.GI1841@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swsnyder@insightbb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox