News for hackers. Stuff that matters.
Re:Linux with “memory folios”: a 7% performance boost when c... by astrange on Tuesday June 15, 2021 @01:39PM (#27518764)
I suspect -march=native is the only thing doing any work here. The other optimizations are as likely to find compiler bugs as they are to improve things, once you get off well-tested paths.
Re:Linux with “memory folios”: a 7% performance boost when c... by bayindirh on Tuesday June 15, 2021 @02:22PM (#27519433)
I think it's the opposite. A good annotated code which can use SIMD instructions accelerates tremendously with -O3. -march=native -mtune=native generally improves things if you can saturate the cores with instructions, which can be measured by running perf record and looking to IPC & instruction retirement numbers.

When I was using Eigen on my code, the biggest performance boost came from -O3. -march and -mtune did minimal improvements on the systems which I've ran benchmarks on.

Re:Linux with “memory folios”: a 7% performance boost when c... by astrange on Tuesday June 15, 2021 @02:57PM (#27519903)
ffmpeg and associated projects do not rely on autovectorization, which pretty much only works on naive scientific code. They write their SIMD in assembly and don't need to care about compiler settings.
Re:Linux with “memory folios”: a 7% performance boost when c... by bayindirh on Tuesday June 15, 2021 @03:33PM (#27520381)
If you're compiling hand tuned assembly, -march and -mtune probably will have more effect when compared to compiling and optimizing C/C++ code.

OTOH, I'd like to underline that heavily optimized scientific code and libraries are neither naive (in terms of algorithmic complexity/implementation) nor straightforward :D

E.g.: This is how Eigen configures its internal vectorization parameters: https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Co...