Vector algorithms: Add compile time checks for ISA features - #6098
Conversation
When the STL is compiled with /arch:SSE4.2 or /arch:AVX2, the runtime checks for the respective ISA features (SSE42, AVX2) are unnecessary. This change adds a compile time check using __check_arch_support to avoid the runtime cost.
|
But what is the purpose? For end users, the STL comes precompiled, so |
|
For custom built binaries (msvcp140_oss.dll) with modern |
|
For reference,
|
|
I'm mirroring this to the MSVC-internal repo. Please notify me if any further changes are pushed, otherwise no action is required. |
f25bfb5
into
microsoft:main
🎉 🚀 🦖 |
When the STL is compiled with /arch:SSE4.2 or /arch:AVX2, the runtime checks for the respective ISA features (SSE42, AVX2) are unnecessary. This change adds a compile time check using __check_arch_support to avoid the runtime cost.