Does dmd have SSE intrinsics?

Don nospam at nospam.com
Mon Sep 21 03:13:09 PDT 2009


Jeremie Pelletier wrote:
> While writing SSE assembly by hand in D is fun and works well, I'm wondering if the compiler has intrinsics for its instruction set, much like xmmintrin.h in C.
> 
> The reason is that the compiler can usually reorder the intrinsics to optimize performance.
> 
> I could always use C code to implement my SSE routines but then I'd lose the ability to inline them in D.

I know this is an old post, but since it wasn't answered...

Make sure you know what the SSE intrinsics actually *do* in VC++/Intel! 
I've read many complaints about how poorly they perform on all compilers 
-- the penalty for allowing them to be reordered is that extra 
instructions are often added, which means that straightforward C code is 
sometimes faster!

In this regard, I'm personally excited about array operations. I think 
the need for SSE intrinsics and vectorisation is a result of abstract 
inversion: the instruction set is higher-level than the "high level 
language"! Array operations allow D to catch up with asm again. When 
array operations get implemented properly, it'll be interesting to see 
how much need for SSE intrinsics remains.



More information about the Digitalmars-d mailing list