3 ms·
I'd say -O2 -march=native -mtune=native is good enough, you get (some) AVX without the O3 weirdness.
by tmtvl 11mo ago
I'd say -O2 -march=native -mtune=native is good enough, you get (some) AVX without the O3 weirdness.
- pedrocr 11mo agoThat's great if you're compiling for use on the same machine or those exactly like it. If you're compiling binaries for wider distribution it will generate code that some machines can't run and won't take advantage of features in others. To be able to support multiple arch levels in the same binary I think you still need to do manual work of annotating specific functions where several versions should be generated and dispatched at runtime.