3 ms·
A library is compiled with a compiler.
by LfLxfxxLxfxx 7y ago
A library is compiled with a compiler.
- masklinn 7y agoThis check is the opposite of compiler autovectorisation. Its point is specifically for the library to dispatch between implementations (e.g. to an explicitly vectorised one)
- fulafel 7y agoYes, and it can make sense to dispatch between compiler-vectorised and non-simd implementations.
- masklinn 7y agoIt does make sense, the issue at hand is how it's done: by checking for the CPU vendor / product line rather than asking the CPU if it has the operations we want.
- fulafel 7y agoYep - capabilities based switching makes most sense when you are just interested on what code can successfully execute, and not making decisions based on known perf characteristics of microarchitectures. But this subthread was about "where in glibc is SIMD used anyway?" and the answer is that in all code, potentially.
- fulafel 7y agoRe-reading this, check is orthogonal to autovectorisation. Opposite of autovectorisation would be manually written SIMD assembly / intrisics code.