3 ms·
No, it's on a per-function basis. On program startup it does the necessary checks (CPUID etc.) and sets up the function pointers appropriately (see the IFUNC me
by jabl 9y ago
No, it's on a per-function basis. On program startup it does the necessary checks (CPUID etc.) and sets up the function pointers appropriately (see the IFUNC mechanism in the linker).
See e.g. https://lwn.net/Articles/691932/ https://lwn.net/Articles/691932/
- davidcuddeback 9y agoThanks! I was trying to find some information on this, but didn't know the right search terms.
- faragon 9y agoThat's OK for code e.g. you know it could benefit from SIMD usage. However you can not tag every function of user code for safe/unsafe mode. Also, optimizations would increase the mess (inlining, unrolling, etc.). Generated code would be a "Frankenstein".