[KLUG Members] Compiler optimization for CPU arch?

Bruce Smith members@kalamazoolinux.org
17 Dec 2002 13:20:51 -0500


For the average user (whatever that is), how much difference does
compiling for higher level CPU's really make?

I know Mandrake compiles their entire distribution for i586.  Is that
_noticeably_ faster than Redhat's i386 binaries?

The reason I ask, is I've been evaluating Linux browsers for my users. 
I compared Mozilla, Galeon (both stock RH8 RPM's), Netscape 7.01 and
Opera 6.11.  Of the two people who tested these browsers, both seemed to
think that Netscape was the fastest.  And Netscape had "i686" in it's
filename, implying it was compiled for i686.  Is that why it seems to
run faster?  Would it be worth recompiling Mozilla/Galeon w/-march=i686?

And if one was to recompile certain packages (like Mozilla), is it worth
making an i686 version AND an athlon version for AMD CPU PC's?  Or would
i686 be good enough for both?  (or how much more gain would
-march=athlon gain me over -march=i686 on an Athlon)?

And what's the limit of what will run where?  Will -march=athlon run on
a i686?  How about the other way around?  With either run on a i586 CPU?
Or a K6?  (I don't care about 386's & 486's)  Where's the new VIA CPU
fit into this (ala some Walmart PC's)?

Anyone got any good links handy for reading about this stuff?  TIA!

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------