Disappointing math performance compared to GDC

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Oct 8 10:37:28 PDT 2014


On Wednesday, 8 October 2014 at 16:23:19 UTC, Gabor Mezo wrote:
> I'm not an ASM expert, but as far as I can see it indeed use 
> some SIMD registers and instructions.

On x86_64, scalar single and double precision math uses the SSE 
registers and instructions by default too. The relevant mnemonics 
(mostly) end with "ss", which stands for "scalar single". On the 
other hand, vectorize code would use e.g. the instructions ending 
in "ps", for "packed single" (multiple values in one SSE 
register).

Your snippet has not actually been vectorized. Assuming that the 
code you posted was from a hot loop, a much bigger problem are 
the many function calls, though.

David


More information about the digitalmars-d-ldc mailing list