4 ms·
(base) Coding % cc -mnative two-three.c clang: error: unknown argument: '-mnative' (base) Coding % cc -v Apple clang version 12.0.0 (clang-1200.0.32.28)
by FabHK 6y ago
(base) Coding % cc -mnative two-three.c
clang: error: unknown argument: '-mnative'
(base) Coding % cc -v
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin20.2.0
Thread model: posix
- astrange 6y agoIt's spelled "-march=native" in gcc and "-arch x86_64h" in clang. It doesn't make much difference though, autovectorization doesn't work very well and there is not a lot of special optimization for newer x86 CPUs.
- namibj 6y agoAll recent Intel Core-i microarchitectures require using full vector width loads to max out L1d bandwidth, because the load/store units don't actually care about the width of a load, as long as it doesn't cross a cache line (in which case the typical penalty is an additional cycle). Only using 128 bit wide instructions on a core that has 512 bit hardware results in 4x less L1d bandwidth.