A look at Chapel, D, and Julia using kernel matrix calculations

welkam wwwelkam at gmail.com
Sun May 24 12:12:09 UTC 2020


On Sunday, 24 May 2020 at 05:39:30 UTC, data pulverizer wrote:
> By this are you saying that SIMD happens automatically with 
> `-mcpu=native` flag?
By default compiler will be conservative and only emit 
instructions that all CPUs can run. For 32 bit executables you 
almost never going to get SSE instructions because stack is not 
guaranteed to be 16 byte aligned and its not easy to prove that 
memory access is aligned and pointers do not alias.
When you tell compiler to generate code for specific CPU 
architecture (-mcpu) it can apply specific optimizations for that 
CPU and that includes SIMD instruction generation.


More information about the Digitalmars-d mailing list