N-body bench

bearophile bearophileHUGS at lycos.com
Thu Jan 30 13:54:16 PST 2014


Stanislav Blinov:

> G++:
> http://codepad.org/oOZQw1VQ
>
> LDC:
> http://codepad.org/5nHoZL1k

You seem to have a quite recent CPU, as the G++ code contains 
instructions like vmovsd. So you can try to do the same with 
ldc2, and use AVX or AVX2.

There are the switches:

-march=<string>            - Architecture to generate code for:
-mattr=<a1,+a2,-a3,...>    - Target specific attributes 
(-mattr=help for details)
-mcpu=<cpu-name>           - Target a specific cpu type 
(-mcpu=help for details)


> LDC basically generated something that I can only call "one 
> straight *whoooosh*"...

:-)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list