Hacker News new | ask | show | jobs
by masklinn 2483 days ago
This 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)
2 comments

Re-reading this, check is orthogonal to autovectorisation. Opposite of autovectorisation would be manually written SIMD assembly / intrisics code.
Yes, and it can make sense to dispatch between compiler-vectorised and non-simd implementations.
It 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.
Yep - 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.