3 ms·
Compiling a few dozen important libraries with a higher x86_64 instruction version unlocking AVX2 or even AVX-512 by default can make a large difference. Normal
by crest 2y ago
Compiling a few dozen important libraries with a higher x86_64 instruction version unlocking AVX2 or even AVX-512 by default can make a large difference. Normally these optimisations aren't used by distro packages because the libraries aren't written in such a way that one binary runs as fast as possible on new CPUs and still runs at all on older CPUs. Instead processes just crash with an illegal instruction exception (aka SIGILL). The tooling exists to allow such libraries and executables to be created and have the runtime linker pick the right implementation at link time, but support for it is spotty.
- rightbyte 2y ago> The tooling exists to allow such libraries and executables to be created and have the runtime linker pick the right implementation at link time, but support for it is spotty. Attribute target_clones works quite well with gcc in my experience, but it is done all by hand for worthwhile functions and should interfere with inlining and short jumps.