3 ms·
The bar is much lower than this question implies for compilers. People don't expect them to take advantage of those SHA instructions automatically. Or even SIMD
by fulafel 4y ago
The bar is much lower than this question implies for compilers. People don't expect them to take advantage of those SHA instructions automatically. Or even SIMD instructions - in the 25 years we've had SIMD instructions in consumer CPUs, compiler generated code usually can't exploit it ("autovectorize") well. (Though largely it's because we haven't updated our programming languages to be conductive to this...)
- jnwatson 4y agoSIMD instructions are so uncommonly used that when you see one in a binary, it is probably an inline memcpy.
- jackmott42 4y agoI mean, its normal to use the instructions for floating point math even when its not actually vectorized, so they are in there all the time. And a 64bit target will tend to enable SSE2 which will get you quite a bit of auto-vectorization. and anything in .NET land since .NET Core will have a ton of SIMD in it
- fulafel 4y agoCompilers do emit the instructions regularly, but they rarely manage to speed up the code much.