[lkml]   [1996]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: kernel optimization options ?
> I am wondering why the kernel is as a default compiled with the -O2 and 
> -fno-strength-reduced options. Why don't we use -O3 and forget the
> -fno-strength-reduced option ? The kernel gets somewhat bigger, but this
> doesn't seem te be much of a problem. Or am I missing something ?

-fno-strength-reduce is used to disable a buggy optimization in GCC 2.7.2.
Also the strength reduction doesn't work very well on CPUs with low
number of registers like Intel.

-O3 makes GCC more or less perform inline as inline can. That will
produce a quite big kernel but no equivalent speed increase. For GCC
aware code like the Linux kernel it is better to use -O2 and the inline
keyword to mark code that should be inlined. So the programmer can
balance between size and speed.


 \ /
  Last update: 2005-03-22 13:38    [W:0.020 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site