[BusyBox] Why is it so bad...?

Tom Cameron TCameron at stmarysbank.com
Mon Jan 22 20:57:50 UTC 2001


Alex,
	I thank you much!  I found your mail to be quite informal, and will
recompile the kernel and applications for my project.  Your explanation was
quite a bit more in depth than most of the info I found online or in man
pages.  Thanks!

--
Thomas Cameron
Network Technician / Operations Specialist
St. Mary's Bank

> -----Original Message-----
> From:	Alex Holden [SMTP:alex at linuxhacker.org]
> Sent:	Monday, January 22, 2001 3:31 PM
> To:	Tom Cameron
> Cc:	busybox at busybox.net
> Subject:	Re: [BusyBox] Why is it so bad...?
> 
> On Mon, 22 Jan 2001, Tom Cameron wrote:
> > 	I was reading through the GCC man page, wondering what horrible
> > things '-O3' did to code, so as to make most people shy away from it.  I
> 
> I don't think it does anything "bad"- the main thing it does is
> automatically inlining functions. On some less mature architectures,
> optimisation in general (not necessarily the features that -O3 turns on
> specifically) can be buggy, and you may occasionally find the compiler
> freezing or crashing on certain constructs when optimisation is turned on 
> (so you need to build the file by hand with optimisation off instead).
> I doubt you'll encounter this on x86, and it's starting to get fairly 
> rare on architectures like ARM. I found in developing TEA-Total that
> certain code ended up much bigger with -O3 than with -O2 without a
> significant speed increase. -Os on the other hand slowed things down
> without giving much of a size decrease, so I'm using -O2. This is on x86
> Linux with GCC 2.95.2.
> 
> > have compiled kernels and programs with this option (instead of -Os or
> -O2),
> 
> As I understand it the reason the kernel uses -O2 is because the critical
> paths have already been hand optimised so much that running it through
> a machine optimiser which doesn't know anything about the context could
> actually make things worse (for example, by increasing the code size and
> thus increasing the cache miss frequency).
> 
> -- 
> ------- Alex Holden -------
> http://www.linuxhacker.org/
>  http://www.robogeeks.org/
> 





More information about the busybox mailing list