I prefer to compile the OS myself

>I prefer to compile the OS myself

i guess it makes some people feel good

id prefer to be able to write one, which i cant atm

Install gentoo.

daily reminder that this is the average Cred Forums poster

>its linux not gnu slash linux

daily reminder that these types of posters are always worse than OP.

if u look this all ur opinions are wrong lmao

>I run a custom kernel

>not building your own distro

>I use bloated binaries with non-optimal optimizations for my cpu when source code is easily available

>I imply

daily reminder that these types of posters are always worse than those types of posters who are always worse than OP

fegorda negbredr xdd

what does one even gain from compiling stuff yourself opposed to just using precomplied binaries t. windows user

>what does one even gain [...]
you can show off at Cred Forums and pretend to be something special

stop using core 2 duo you poor cuck

>Muh 2% performance gains.
Rather reminiscent of Cred Forumstards and their gpu holy wars.

For one you can pick whatever optimization level you prefer instead of using the one the package maintainer decided was best.

Then you can yse -march=native which will enable optimizations linked to your specific processor, something the package maintainer cannot do because it has to run on many different processors.

But most importantly you can pick only the features in a package you need, instead of relying on what the package maintainer decided was good enough.

Modern cpus have many extensions to their instruction set that go unused in precompiled binaries because of the need to make the binary compatible with older cpu that lack the instructions. In x86 those instructions are mainly vector sets like avx, avx2, all sse > 2 and more, and for certain workloads can make an big difference.
Obviously compiling the code of a program by yourself only makes sense if you really need the speedup, but there are distros like gentoo that basically do the compilation for you, combining the ease of use of precompiled generic binaries with the increased efficiency of a manual compilation, that is if you don't mind the extra time its package manager takes to compile packages conpared to thos that just download and install prebuilts

Is there any tutorial how to achieve max speed optimization when compiling?

That depends on the package, a default of `-O2 -march=native -pipe` is good for most things.

Using `-Os` could get you even more performance in some cases, but it would disable alignment optimizations which might lose you performance.

Using `-O3` is likely going to break packages, same goes for `-Ofast`, but you could try on a per-package basis and see what happens.

The gentoo wiki has a page dedicated to compiler optimizations, search for it.
In reality though -O3 and -march=native are all you need to get to like 95% of the potential of your cpu, try -Ofast if you really need to squeeze your cpu power to the last transistor.

>Calling people 'faggots' in 2016

come on, now. it's 'cuck'.