CFLAGS="-Ofast -mmmx -mssse3 -pipe -funroll-loops -flto=8 -floop-block -floop-interchange -floop-strip-mine...

>CFLAGS="-Ofast -mmmx -mssse3 -pipe -funroll-loops -flto=8 -floop-block -floop-interchange -floop-strip-mine -ftree-loop-distribution"

Anything else is bloat

Attached: 1539196863676.png (982x1274, 76K)

Other urls found in this thread:

godbolt.org/z/qoccYs
funroll-loops.teurasporsaat.org/
harmful.cat-v.org/software/dynamic-linking/
twitter.com/NSFWRedditVideo

>redditfrog

dumb frogposter

Attached: file.png (1150x219, 77K)

>relying on the compiler to optimise your shitty code instead of just writing good code

>missing the point completely

At least enable CMOV and MOVBE and BMI2 you shit

why would you need anything more than
CFLAGS=-march=native -O2

and replace -O2 with -Os if you don't have a SSD.

Use march=native you fucking brainlet.

CFLAGS="-Osanic"

>-floop-interchange -floop-strip-mine
do you know what these do?

makes go fats

Attached: 1508794155511.jpg (800x450, 48K)

the ultimate redpill is -nostdlib

>mmx
>current year
lmao

how about manually unrolling them?
not like a dumb 100% but lets just say 2 times?

>having compilers installed on your computer
bloat

>what is march=native O3

O3 and Ofast are placebo
O2 is good enough and better tested

>funroll-loops
>anything else is bloat

objectively wrong
godbolt.org/z/qoccYs

O3 actually just enable several more optimizations but it can lead to instability.

-O3 (not to mention -Ofast) and especially -funroll-loops can actually slow down code often in practice, since they produce a larger executable that induces more cache misses. -O2 is a safe bet.
LTO on the other hand often shrinks the binary in practice without losing performance, making it a solid option to use, and I'm surprised they aren't recommended more. Graphite optimizations too can help, since they usually don't incur a performance/size tradeoff.
Not all packages build correctly with those options, however, so you need to be careful.

Attached: Ricer1322537304.jpg (546x386, 36K)

Agressive flags work, that's why clear Linux leads in all performance benchmarks.

>-O3
>not bloated as first
use -Os you moron

LTO doubles your compilation times.

Yeah, now benchmark that code
Pro tip: it's just the fucking same

funroll-loops.teurasporsaat.org/

>anything more than -O2 -pipe -march=native -mtune=native
gas all frogshitters.

You forgot --static there my son

Attached: 1512385313235.png (610x764, 332K)

Yes goy don't optimise your system stick to binary distributions

Attached: jew_basic (2).jpg (600x600, 38K)

Why would unrolling loop be dangerous, wtf?
Sure it makes the executable bigger but how the fuck is it dangerous, dumb gentoofags.

dumb suckless poster

but does it increase the runtime performance?

>manually setting that shit
The compiler knows better than you. You should only set the optimization level plus maybe some optimizations like graphite, LTO and -fipa-pta.

>not using -static with clang+musl

>emits simd code
You're a dumb shit if you think it's going to be the same

What are the benefits?

A lot of C/C++ code has undefined behavior on some branches. Compiler might produce somewhat sane results of lesser optimization levels, but all bets are off at -O3/-Ofast

harmful.cat-v.org/software/dynamic-linking/

Static linking bloats my ram and my binaries with duplicate code. I dont want libc to be loaded (indirectly) into ram hundreds of times.

>fun roll

Attached: apu.jpg (550x441, 34K)

do people take the harmful nonsense from catv actually seriously? what the fuck...

>gcc manual says its unstable
>blames gentoo
ok

(((GCC)))

Enjoy your slow startup times and dll hell.

Fact: O3 will never, ever generate code that run slower than O2 for a standard-compliant program that doesn't rely on undefined behavior. If it does, it's a bug and you should use a better compiler.

Why are my binaries larger when I compile with LTO

Attached: 1520694476329.jpg (846x1024, 80K)