lkml.org 
[lkml]   [2000]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Is there a way to benchmark general kernel performance?
In <20000105213309.ZAEH26071.mail.rdc1.il.home.com@mercury.snydernet.lan> Steve Snyder (swsnyder@home.com) wrote:
> I've read varying opinions as to whether this or that compiler option
> will really improve the performance of the Linux (versions 2.2.1x)
> kernel. This is with egcs v1.1.2.

> Does changing the default "-m486" to "-march=i686" really improve the
> code generated? If I change the default "-O2" to "-O3" will the code
> run faster or just consume more RAM?

Not know about -march=i686 but -O3 will produce code that run SLOWER (in most
cases) and consume more RAM :-) It's quite often patter in Linux kernel:
fast path is inline function and exceptional cases is "normal" function.
When compiler will try to inline both functions it'll make code bigger and
slower (think about cache). And it's not clear if generated code will be
even correct. -O3 and -O2 differs only in autoinlining and it's EXACTLY what
you DO NOT want in kernel: functions to be inlined are already marked as such
and compiler can do things only worse (if some function is not inlined while
inlining can help you should submit simple patch and not use -O3)...




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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