Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
64bit Gentoo not that much optimizable?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
ial
Apprentice
Apprentice


Joined: 27 Dec 2008
Posts: 161
Location: Warsaw (Warszawa)

PostPosted: Wed Jun 24, 2009 11:30 am    Post subject: 64bit Gentoo not that much optimizable? Reply with quote

Reading this thread:
https://forums.gentoo.org/viewtopic-t-772298.html
gringo wrote:
Quote:
ie constant need to add packages to keywords.

yup, been there, because of that "issue" i switched to ~arch ;)
But by switching to ~arch you will probably hit other, more serious issues of course

it makes me think whether there is a point of doing 64bit os as exactly Gentoo - or it would be much stablier and still as much fast to switch to different, precompiled, 64 bit os like ArchLinux?

Rationale behind this is the main power of self-compiled linuses, like Gentoo, relies mainly on their freedom in deep opitimization but under the uncompromised condition of retaining the full stability.
In 64bit Gentoo the latter isn't true. And also e.g. hardware opitimization isn't that much possible in the 64bit architecture, right? There are much less compiller's flags and so on than in x86...
Issues with unstable 64bit sources aro so much prevailing there is no time even to think about some optimizational challenges.

Please, signal me if I am wrong. Thanks in advance.
Back to top
View user's profile Send private message
loki99
Advocate
Advocate


Joined: 10 Oct 2003
Posts: 2056
Location: Vienna, €urope

PostPosted: Wed Jun 24, 2009 12:11 pm    Post subject: Reply with quote

These are just my 2 cents but here I go. ;)

There is no need to add packages to keywords to a stable amd64 install unless you want some apps that are stil keyworded. Most people just don't want to wait when they find out that a new version is available and so they add a few packages to their keywords out of curiostity which may pull in other apps that are keyworded. But this is same no matter which arch you choose, so if you want it stable you can easily have it stable.

And the speed difference that Gentoo can achive is not due to uber optimization of cflags and the like but to the possibility to only install the things you really want and need while other distros tend to pack as much features as possible into any application, trying to please everyone. For example:
Code:
[ebuild   R   ] media-sound/amarok-2.1  USE="mtp opengl semantic-desktop -cdaudio -daap -debug -ipod -mp3tunes" LINGUAS="de -bg -ca -cs -da -el -en_GB -es -et -eu -fr -gl -he -is -it -ja -km -ku -lt -lv -nb -nds -nl -nn -pa -pl -pt -pt_BR -ro -ru -sl -sv -th -tr -uk -wa -zh_CN -zh_TW" 0 kB

In Gentoo you can decide whether your amarok install gets compiled with opengl/ipod/etc support or not. I don't have an ipod so it wouldn't make much sense to compile it with ipod support. If you get your binarys from any precompiled distro the concerned developer makes that decision for you and most probaly will compile it with ipod support (==> bigger package, longer startup time, more bloat).

And by the way, messing with your cflags most probably won't help you speed up things anyway and will cause more troubles (talking about stability), unless you really do know what you are doing. And you'd lose support for your install because the devs only support sane cflags.

For me, Gentoo never was about speed but more about configurability anyhow.
Back to top
View user's profile Send private message
ial
Apprentice
Apprentice


Joined: 27 Dec 2008
Posts: 161
Location: Warsaw (Warszawa)

PostPosted: Thu Jun 25, 2009 12:49 pm    Post subject: Reply with quote

loki99 wrote:
And the speed difference that Gentoo can achive is not due to uber optimization of cflags and the like but to the possibility to only install the things you really want and need while other distros tend to pack as much features as possible into any application, trying to please everyone.

Yes, I understand that fully, but on fast 64bit hardware (with vast resources, as >4GB of RAM, designed with clear intention to satiate always power greedy & res-wastful MS Vista) will it (i.e. binary distro's "bloatings") influence the overall performance for the 'usual' user of linux still ever leaner by order of magnitude? (The user which wants to do usual end-user things, like running Amarok :wink:, on a typical home workstation.) I have some doubts.

Because if we want to exeprience the speed limit and the full potential of 64bit hardware it will occur rather under more extreme professional/scientific software (complex data bases, scientific simulations etc.). And this sort of software seldom provides many 'USE' flags (especially if we create e.g. simulation software ourselves - what in most cases is the case :wink:)
So, then the whole speed improvement comes from compiler's flags, doesn't it?
Back to top
View user's profile Send private message
Hupf
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2005
Posts: 112
Location: Germany

PostPosted: Thu Jun 25, 2009 3:09 pm    Post subject: Reply with quote

Different compiler flags will, on a global scope, only increase performance by ~3% *maximum*. Much more important is e.g. the use of SIMD extensions (like SSE), preferably through -march=native. Also, switching to 64bit will allow for more processor registers (greatly improving performance by itself) and simplify memory management (no PAE needed).

Basically, setting C(XX)FLAGS="-march=native -O2 -pipe -fomit-frame-pointer" should be more than enough for performance. Anything else will be more likely to heavily break things (yes, even -O3 may lead to programs hanging etc.). In my experience, disabling unneeded USE flags is much more of a performance giver than any compiler flags.
Back to top
View user's profile Send private message
ial
Apprentice
Apprentice


Joined: 27 Dec 2008
Posts: 161
Location: Warsaw (Warszawa)

PostPosted: Thu Jun 25, 2009 4:22 pm    Post subject: Reply with quote

Let's put things into numbers... Please assess (approximately) by how much % speed will be increased because of 'natve' flag, 64bit processor registers, no PAE etc. and by how much thanks to USE flags?

And also let me ask whether performance boost from USE trimming is about CPU and executing program's code itself? Or do you rather mean other types of overhead like loading programs/libraries into memory etc.?

BTW. Are binary distros compiled with the 64bit C(XX)FLAGS (like '-march=native') and do they utilize 64bit registers?
Back to top
View user's profile Send private message
Hupf
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2005
Posts: 112
Location: Germany

PostPosted: Fri Jun 26, 2009 11:14 am    Post subject: Reply with quote

ial wrote:
Let's put things into numbers... Please assess (approximately) by how much % speed will be increased because of 'natve' flag, 64bit processor registers, no PAE etc. and by how much thanks to USE flags?

I don't have any numbers at hand since I'm not interested in benchmarks myself. Anyways, the figures will vastly depend on the application and hardware used, so it is impossible to give any general result here. For example, I've coded a small combinatorics-related number-crunching app once. When migrating from a Pentium4-x86 to a Athlon64-x64 hardware and optimized binary, the performance gain was as much as 900%. On the other hand, the majority of day-to-day applications (web browser etc.) will at best see an increase of 2%, if not even losing performance due to side effects.
Name the application, test case and hardware to be used and maybe someone will be able to compute a benchmark for that.

ial wrote:
And also let me ask whether performance boost from USE trimming is about CPU and executing program's code itself? Or do you rather mean other types of overhead like loading programs/libraries into memory etc.?

For desktop use, available RAM, hard disk latency and bandwith are the main bottlenecks in my experience. So for home office uses, an optimized boot process (e.g. squashfs with correctly reordered files to allow for linear read) with enough RAM and maybe even precached will bring far more of a performance gain than any CPU-related optimizations (in software or in hardware).
For CPU-intensive work like video encoding, rendering, scientific computations, heavy spreadsheets, games and the like, app-specific CFLAGs (set by the developer on a per-library or even per-sourcefile basis) will already do more good than global CFLAGs could ever achieve. The -march flag is mostly meant to allow specific extensions (SSE, ...) already at compile time, if used by the programmer.

ial wrote:
BTW. Are binary distros compiled with the 64bit C(XX)FLAGS (like '-march=native') and do they utilize 64bit registers?

No and yes. Distributors have to be very careful about -march, since it will bread support for some hardware. Therefore I assume that most of them tend to some very conservative choice like -march=386 -mtune=686 for their binaries. The register space is available on all x86_64 processors, so the amd64 binary releases will use it.
Back to top
View user's profile Send private message
ial
Apprentice
Apprentice


Joined: 27 Dec 2008
Posts: 161
Location: Warsaw (Warszawa)

PostPosted: Fri Jun 26, 2009 11:59 am    Post subject: Reply with quote

Hupf wrote:
ial wrote:
Let's put things into numbers... Please assess (approximately) by how much % speed will be increased because of 'natve' flag, 64bit processor registers, no PAE etc. and by how much thanks to USE flags?

the figures will vastly depend on the application and hardware used, so it is impossible to give any general result here. For example, I've coded a small combinatorics-related number-crunching app once. When migrating from a Pentium4-x86 to a Athlon64-x64 hardware and optimized binary, the performance gain was as much as 900%.

Yes, but I meant sort of performance comparison on exactly the same 64bit hardware but between 32bit and 64bit Gentoo on it.
This is probably what is mostly welcome by users who already have 32bit Gentoo well working on their 64bit CPUs and they ponder whether it is worth to make the whole cumbersome installation (of Gentoo's 64bit version) anew?
Back to top
View user's profile Send private message
tgR10
Apprentice
Apprentice


Joined: 23 Oct 2007
Posts: 262
Location: caly ten ambaras

PostPosted: Fri Jun 26, 2009 12:57 pm    Post subject: Reply with quote

i got both x86 and x86_64 on 1 pc
switched to x86_64 like month ago or so, i used amd64 like year ago but it wasn't stable during work as it is now
i don't have any benchmarks i just don't go back to 32bit
the only thing i noticed that on 32bit system cfq scheduel works much better than on amd64 for me, on 64bit i'm using anticipatory, also i did change preamption kernel to high latency desktop and rtc to 1000hz(i had 350 or so on 32bit) and i don't have any random half sec or a sec mouse locks none of those :)
and im using ~arch both
so what i can say - you should try it, 64bit grown up a litle since last time i used it
that's what i'm using
Code:
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1"

i hope it'll help a lil
_________________
"bo kto ma racje ? ten kto z bliska zobaczy"
"moge nie wiedziec,wchlaniam niewiedze z malych torebek"
http://i12.tinypic.com/4pow0mu.png
http://userbar.tgr.debil.eu/userbar.jpg
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Jun 26, 2009 2:00 pm    Post subject: Reply with quote

ial wrote:
Reading this thread:
https://forums.gentoo.org/viewtopic-t-772298.html
gringo wrote:
Quote:
ie constant need to add packages to keywords.

yup, been there, because of that "issue" i switched to ~arch ;)
But by switching to ~arch you will probably hit other, more serious issues of course

it makes me think whether there is a point of doing 64bit os as exactly Gentoo - or it would be much stablier and still as much fast to switch to different, precompiled, 64 bit os like ArchLinux?

Rationale behind this is the main power of self-compiled linuses, like Gentoo, relies mainly on their freedom in deep opitimization but under the uncompromised condition of retaining the full stability.
In 64bit Gentoo the latter isn't true. And also e.g. hardware opitimization isn't that much possible in the 64bit architecture, right? There are much less compiller's flags and so on than in x86...
Issues with unstable 64bit sources aro so much prevailing there is no time even to think about some optimizational challenges.

Please, signal me if I am wrong. Thanks in advance.


My rationale is very different: if you are using Gentoo because of CFLAGS, then you are wasting your time. Might it be x86 or any other arch under the sun. Compiler flags are the same for all arches, mostly. Except for a few specific cases. Of course there are x86 flags that makes no sense in x86_64. But most of the flags are arch-agnostic. Just look at the size of the gcc man page.

Anyway, as said, if that's your only (or even your main) reason to use Gentoo, then you are wasting your time, in my humble opinion.


ial wrote:
Hupf wrote:
ial wrote:
Let's put things into numbers... Please assess (approximately) by how much % speed will be increased because of 'natve' flag, 64bit processor registers, no PAE etc. and by how much thanks to USE flags?

the figures will vastly depend on the application and hardware used, so it is impossible to give any general result here. For example, I've coded a small combinatorics-related number-crunching app once. When migrating from a Pentium4-x86 to a Athlon64-x64 hardware and optimized binary, the performance gain was as much as 900%.

Yes, but I meant sort of performance comparison on exactly the same 64bit hardware but between 32bit and 64bit Gentoo on it.
This is probably what is mostly welcome by users who already have 32bit Gentoo well working on their 64bit CPUs and they ponder whether it is worth to make the whole cumbersome installation (of Gentoo's 64bit version) anew?


I don't get the point. The installation is equally "cumbersome" under x86, x86_64 or sparc. It's the same handbook, mostly. If what you ask is if it's worth the migration, then in brute terms, probably not, unless you do a lot of number crunching or media encoding. But you don't have to stay looking at your screen. You can compile your new 64 bits system on an xterm while you continue working on your old x86 installation as always.
Back to top
View user's profile Send private message
ial
Apprentice
Apprentice


Joined: 27 Dec 2008
Posts: 161
Location: Warsaw (Warszawa)

PostPosted: Fri Jun 26, 2009 10:13 pm    Post subject: Reply with quote

i92guboj wrote:
if you are using Gentoo because of CFLAGS, then you are wasting your time.
Maybe besides USE flag trimming-opimization, the big point of self compiling a source code could be about security, couldn't it? We have very limited control about Internet-distributed binaries, haven't we?
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Fri Jun 26, 2009 10:43 pm    Post subject: Reply with quote

who says ~amd64 / 64bit isn't stable ? I've made the experience that ~amd64 is much more stable and working than the so-called "stable" amd64

and who says that optimization on ~amd64 isn't as much possible as on x86 ?:



try that:
Quote:
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -fno-strict-overflow -finline-limit=700 -mno-align-stringops -minline-stringops-dynamically -fno-delete-null-pointer-checks -fno-ident -freorder-blocks-and-partition -ftree-loop-ivcanon -fira-coalesce -fvariable-expansion-in-unroller -falign-functions=0 -falign-jumps=0 -falign-labels=0 -falign-loops=0 -mno-push-args -fno-defer-pop -fgcse -fgcse-las -fgcse-lm -fivopts -fgcse-after-reload -fweb -frename-registers -fpredictive-commoning -funswitch-loops -ftree-loop-im -fmove-loop-invariants -fsched-spec-load -fmodulo-sched -freschedule-modulo-scheduled-loops -fmodulo-sched-allow-regmoves -fgcse-sm -ftree-vectorize -fno-peephole -fprefetch-loop-arrays -fstack-protector-all -fstack-protector -D_FORTIFY_SOURCE=2 -ftree-loop-distribution -floop-block -fipa-cp-clone -floop-interchange -floop-strip-mine -ftree-pre -combine"

Quote:
CXXFLAGS="${CFLAGS}"

Quote:
LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--sort-common -Wl,--relax -Wl,-z,now -Wl,-z,relro -Wl,--as-needed"

:twisted:
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
loftwyr
l33t
l33t


Joined: 29 Dec 2004
Posts: 970
Location: 43°38'23.62"N 79°27'8.60"W

PostPosted: Fri Jun 26, 2009 10:46 pm    Post subject: Reply with quote

Wow a huge list of redundant flags. Most are default and most are simply overridden with -march=native.

Nice work.
_________________
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Jun 27, 2009 12:45 am    Post subject: Reply with quote

ial wrote:

BTW. Are binary distros compiled with the 64bit C(XX)FLAGS (like '-march=native') and do they utilize 64bit registers?


Certainly not, march=native imply some optimizations based on your current cpu/host, you can guess easy that if you build binaries with a cpu that use some specific optimizations, others cpu that don't handle them will crash.
Like building something with -march-native and an opteron would enable 3dnow that intel cpu will not enjoy.
This is the same for 32bits.
I saw safe cflags for gentoo (i think it was in the wiki) that told people with core2 to use -march=prescott for 32bits and -march=nocona or -march=core2 for 64bits, while you can use -march=core2 in both case, your HOST will allow 64bits code and registers to be use, gcc isn't that dumb.

The 64bit registers: of course, if not it's not a 64bits distro.
Back to top
View user's profile Send private message
tgR10
Apprentice
Apprentice


Joined: 23 Oct 2007
Posts: 262
Location: caly ten ambaras

PostPosted: Sat Jun 27, 2009 1:51 am    Post subject: Reply with quote

kernelOfTruth wrote:

try that:
Quote:
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -fno-strict-overflow -finline-limit=700 -mno-align-stringops -minline-stringops-dynamically -fno-delete-null-pointer-checks -fno-ident -freorder-blocks-and-partition -ftree-loop-ivcanon -fira-coalesce -fvariable-expansion-in-unroller -falign-functions=0 -falign-jumps=0 -falign-labels=0 -falign-loops=0 -mno-push-args -fno-defer-pop -fgcse -fgcse-las -fgcse-lm -fivopts -fgcse-after-reload -fweb -frename-registers -fpredictive-commoning -funswitch-loops -ftree-loop-im -fmove-loop-invariants -fsched-spec-load -fmodulo-sched -freschedule-modulo-scheduled-loops -fmodulo-sched-allow-regmoves -fgcse-sm -ftree-vectorize -fno-peephole -fprefetch-loop-arrays -fstack-protector-all -fstack-protector -D_FORTIFY_SOURCE=2 -ftree-loop-distribution -floop-block -fipa-cp-clone -floop-interchange -floop-strip-mine -ftree-pre -combine"

Quote:
CXXFLAGS="${CFLAGS}"

Quote:
LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--sort-common -Wl,--relax -Wl,-z,now -Wl,-z,relro -Wl,--as-needed"

:twisted:


Oo

hell yeah i will !
do you have any info about what each flags do ? i don't wana start digin google for each flag
_________________
"bo kto ma racje ? ten kto z bliska zobaczy"
"moge nie wiedziec,wchlaniam niewiedze z malych torebek"
http://i12.tinypic.com/4pow0mu.png
http://userbar.tgr.debil.eu/userbar.jpg
Back to top
View user's profile Send private message
Hupf
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2005
Posts: 112
Location: Germany

PostPosted: Sat Jun 27, 2009 6:56 am    Post subject: Reply with quote

tgR10 wrote:
hell yeah i will !

Don't. Trust me. Some computational scientist once said about optimization: "Nobody really cares how fast you can compute the wrong answer". Here, replace with "how fast your system will crash".

Quote:
do you have any info about what each flags do ? i don't wana start digin google for each flag

man gcc.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sat Jun 27, 2009 9:06 am    Post subject: Reply with quote

Hupf wrote:
tgR10 wrote:
hell yeah i will !

Don't. Trust me. Some computational scientist once said about optimization: "Nobody really cares how fast you can compute the wrong answer". Here, replace with "how fast your system will crash".
.


++

in general I'm running much less flags - view it as a kind of experiment which was successful (it doesn't crash ! and works 99% without problems :lol: )

Quote:
Wow a huge list of redundant flags. Most are default and most are simply overridden with -march=native.

yeah a few of them but not much :wink:
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
ial
Apprentice
Apprentice


Joined: 27 Dec 2008
Posts: 161
Location: Warsaw (Warszawa)

PostPosted: Sat Jun 27, 2009 1:33 pm    Post subject: Reply with quote

i92guboj wrote:
If what you ask is if it's worth the migration, then in brute terms, probably not, unless you do a lot of number crunching or media encoding.
And what about emerge compilations? The faster the better, isn't it?
Back to top
View user's profile Send private message
stmiller
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2006
Posts: 119

PostPosted: Sat Jun 27, 2009 2:21 pm    Post subject: Reply with quote

This is an interesting unscientific poll:

https://forums.gentoo.org/viewtopic-t-774221.html
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sat Jun 27, 2009 3:19 pm    Post subject: Reply with quote

ial wrote:
i92guboj wrote:
If what you ask is if it's worth the migration, then in brute terms, probably not, unless you do a lot of number crunching or media encoding.
And what about emerge compilations? The faster the better, isn't it?


what do you mean with that ?

if an app compiles in a shorter time it's automatically better ?

definitely no ! the more optimizations you apply the longer it takes -> the better it may run ...
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
ial
Apprentice
Apprentice


Joined: 27 Dec 2008
Posts: 161
Location: Warsaw (Warszawa)

PostPosted: Sat Jun 27, 2009 9:33 pm    Post subject: Reply with quote

kernelOfTruth wrote:
if an app compiles in a shorter time it's automatically better ?
definitely no ! the more optimizations you apply the longer it takes -> the better it may run ...

Come on! I meant compiling by 64bit gcc would be much(?) faster and maybe it was worth of migrating to 64bit Gentoo instead of still sticking to 32bit one that run on (the same) 64bit hardware...

In other words, on the same 64bit box we have dual boot with 2 oses: x86-Gentoo and 64bit-Gentoo. Then we proceed with 2 compilations of open-office - with the same flags but one under x86-Gentoo and the second under 64bit-Gentoo.
So, how much time (hours+minutes) will it consume under x86-Gentoo and how faster will it take under 64bit-Gentoo? Please, to your best experience and intuition, try to asses these both numers! :)
It would help to decide whether to migrate for those not planning to do number crunching calculations, run complex databases etc. Thaks in advance.
Back to top
View user's profile Send private message
tgR10
Apprentice
Apprentice


Joined: 23 Oct 2007
Posts: 262
Location: caly ten ambaras

PostPosted: Sun Jun 28, 2009 5:03 am    Post subject: Reply with quote

Hupf wrote:
tgR10 wrote:
hell yeah i will !

Don't. Trust me. Some computational scientist once said about optimization: "Nobody really cares how fast you can compute the wrong answer". Here, replace with "how fast your system will crash".

what i meant "i try them if i know what they do"
tgR10 wrote:
do you have any info about what each flags do ? i don't wana start digin google for each flag

Hupf wrote:
man gcc.

too much data at once (: hehe
_________________
"bo kto ma racje ? ten kto z bliska zobaczy"
"moge nie wiedziec,wchlaniam niewiedze z malych torebek"
http://i12.tinypic.com/4pow0mu.png
http://userbar.tgr.debil.eu/userbar.jpg
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Fri Aug 28, 2009 5:27 pm    Post subject: Reply with quote

try this: download vegastrike

once compile it with no cflags.

then compile it with -enable-release=3 --enable-flags=-march=amdfam10 -O3 -msse3 -msse4a -mabm -pipe --disable-debug

or something like that.

Difference in fps up to 20%. Depending on the situation.

I started with self compiling stuff when an optimized glibc,X and xine meant I was able to watch dvds on my k6-2 400 back then...

so with the right choice and the right packages some nice increases can be achieved.

BUT: no matter which flags you use, slow hardware will always be slow hardware. You might be able to make it less bad, but never good. Most distris turn on -O2 anyway, but skip march and sse flags. Depending on the app/lib that can mean no difference at all or a nice boost. Stuff like mplayer sets its own flags - partly for some very good reason. Optimizing expat will probably don't do much, or bison or vi or nano. ;)

So it depends.

USEFLAGs don't do much for the running code - but the smaller the binary, the less linking on startup, the faster it loads and the more 'quicker' feels a system. Also, less crap, more room for your own stuff. Sure, harddisks are huge - but movies are huge too ;)
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2998
Location: Bay Area, CA

PostPosted: Mon Aug 31, 2009 7:11 am    Post subject: Reply with quote

Code:
signal -SIGWRONG you
oops sorry...need to use kill
Code:
kill -SIGWRONG you
Back to top
View user's profile Send private message
durian
Guru
Guru


Joined: 16 Jul 2003
Posts: 312
Location: Margretetorp

PostPosted: Mon Aug 31, 2009 7:27 am    Post subject: Reply with quote

ial wrote:
Maybe besides USE flag trimming-opimization, the big point of self compiling a source code could be about security, couldn't it? We have very limited control about Internet-distributed binaries, haven't we?
For that to work you'd have to check all the source code you download as well...

-peter
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Mon Aug 31, 2009 8:12 am    Post subject: Reply with quote

durian wrote:
ial wrote:
Maybe besides USE flag trimming-opimization, the big point of self compiling a source code could be about security, couldn't it? We have very limited control about Internet-distributed binaries, haven't we?
For that to work you'd have to check all the source code you download as well...

-peter


well, self compiling does have an advantage. With binary distros all libs nd binaries and their layout are identical on all systems. So hack it once, use the exploit on every other system with the distro installed. In theory gentoo systems are a tiny bit harder to hack because of the higher variety.

But that is very theoretical and a buffer overflow in bind will always bite you ;)
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum