Messages in this thread |  | | From | Systemkennung Linux <> | Subject | Re: kernel optimization options ? | Date | Thu, 24 Oct 1996 14:35:24 +0200 (MET DST) |
| |
> 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.
Ralf
|  |