How to compile apps to achieve maximum performance?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Most configure scripts take the compiler options from CFLAGS and CXXFLAGS environment variables. Do this before running ./configure (replace "athlon" with your processor type):
while that -s flag is quite popular smaller binaries do not as a rule run faster
i would do lots of benchmarking before embarking on an optimization mission
and never try to optimize glibc or gcc itself
otherwise you can be really agressive even with the kernel
(the kernel requires altering the Makefile)
stability is not the problem everyone says it is
some packages break but not many and it's quite easy to see as you go along so you can go back and redo
Also note that some packages like GCC and GLibC are known to have issues if the default optimizations are changed. Be very careful with optimizing core components!
Originally posted by mrcheeks some packages can not work with such optimizations leaving you with errors you can do nothing about.
you can always go back and recompile anything that doesn't work
it's as easy as doing it the first time only different
you start with
unset CFLAGS
unset CXXFLAGS
like i said these warnings are overblown
i compiled this entire system accept
glibc
gcc
and binutils
with
[QUOTE]Originally posted by foo_bar_foo
[B]you can always go back and recompile anything that doesn't work
it's as easy as doing it the first time only different
you start with
unset CFLAGS
unset CXXFLAGS
Yes you can recompile and i had to do it under freebsd, but i had to track myself which ports i had to recompile to avoid recompiling lots of dependencies...
yes we already know about the racist website and have noticed how some people who have mental problems have to engage in bizarre blaiming activities directed at certain groups in order to feel good about themselves.
i can't really say that it relavent to our discussion.
funroll-loops is a compiler technique whereby loops that have a determinate size are unrolled so the loop data can be moved to and from memory as part of a single cache line prevent mmu cache thrashing.
NORTH if you thing gcc -funroll-loops is not usefull in this way then please provide us with valgrind data to back up your assertion or kindly keep your bizarre opinions to yourself.
I don't really see how the site is racist, but I can't say I've read every word on it either. It's a joke, lighten up.
It's relevant because it's a parody of the mindset that a lot of Gentoo users display, claiming that compiling everything from scratch will make the system magically faster. Sure there are some benefits that can be had when you're not compiling packages to support the lowest common denominator, but IMO it's mostly a waste of time. I'd rather use precompiled pacakges that get real QA done on them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.