Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Dec 2011 11:54:56 +0100
From:      rank1seeker@gmail.com
To:        hackers@freebsd.org
Subject:   Re: CPUTYPE and friends, from 'make.conf' benchmark
Message-ID:  <20111210.105456.372.1@DOMY-PC>
In-Reply-To: <CAGFTUwMEeGPtmJcMXLrCv12xQLXcGcWic5BdUvodiCjHSYAUqw@mail.gmail.com>
References:  <CAGFTUwMEeGPtmJcMXLrCv12xQLXcGcWic5BdUvodiCjHSYAUqw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
My home server was also built with 'native' and it's unixbench score =
was:=0D=0A231.3 (24.6 min)=0D=0A=0D=0A# /bin/sh -c "gcc -v -x c -E =
-mtune=3Dnative /dev/null -o /dev/null 2>&1 | grep mtune | sed -e =
's/.*mtune=3D//'"=0D=0Aathlon-4=0D=0A=0D=0AHere it didn't return =
'generic'=0D=0A=0D=0AJust out of curiosity, I've removed 'native' and =
left only 'CPUTYPE?=3Dathlon-xp'=0D=0AAfter rebuild of OS, it's unixbench =
score is now:=0D=0A319.8 (22.4 min)=0D=0A=0D=0AThat is a 38.26%, global =
speed gain!=0D=0ANow I'm 100% sure, 'native' should always be =
avoided!=0D=0A=0D=0A=0D=0A> It is acceptable to set CPUTYPE and to append =
certain flags to CFLAGS=0D=0A> in make.conf, and CPUTYPE is used in many =
ports for=0D=0A> architecture-dependent build options.=0D=0A=0D=0ADefault =
CFLAGS are are '-O2 -pipe'=0D=0AWhich are recommended and proven to be =
safe?=0D=0A=0D=0A=0D=0A> The use of CPUTYPE usually has a relatively =
modest affect on general=0D=0A> benchmarks in the base system, because a =
lot of code there is=0D=0A> intentionally generic, and is compiled with =
an older toolchain using=0D=0A> conservative flags, so aggressive =
optimizations that can take fuller=0D=0A> advantage of CPU extensions are =
not used.=0D=0A=0D=0AI believe because OS stability, is a top =
priority.=0D=0A=0D=0A> However, CPUTYPE can have a dramatic affect on =
certain applications=0D=0A> when used with appropriate compiler flags =
(-O3, etc.), particularly=0D=0A> those in some ports.=0D=0A=0D=0ASo, =
CPUTYPE is mainly for boosting performance of ported apps.=0D=0ARegarding =
compiler flags (-O3, etc.) I use them, only if port offers =
them.=0D=0A=0D=0A> =0D=0A> b.=0D=0A> =0D=0A=0D=0ADomagoj Smol=E8i=E6



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111210.105456.372.1>