NHacker Next
login
▲Easy dynamic dispatch using GLIBC Hardware Capabilitieskvr.at
38 points by Bogdanp 4 days ago | 3 comments
Loading comments...
loeg 16 hours ago [-]
It is easy, but I'm not sure the coarse-grained levels accurately capture the craziness of which AVX512 feature bits are supported on which models once you get beyond amd64-v3. Maybe it doesn't matter.

https://en.wikipedia.org/wiki/X86-64#Microarchitecture_level...

jeffbee 16 hours ago [-]
If you want to branch around having or not having something like AVX-VNNI you still need to use IFUNC or just patch your own function pointers (this is the better choice, since IFUNC is both slow and a security risk).
thrtythreeforty 15 hours ago [-]
This looks really nice. No pain aside from 3x the build time.

Does anyone know if Windows or macOS provide equivalent dynamic dispatch functionality that's resolved automatically? (Less of a big deal with macOS, but if you wanted to use SVE or something.)