Rquest for timings
bearophile
bearophileHUGS at lycos.com
Thu Nov 24 19:37:11 PST 2011
This is the nbody benchmark of the Shootout site:
http://shootout.alioth.debian.org/u32/performance.php?test=nbody
The faster version is a Fortran one, probably thanks to vector operations that allow a better SIMD vectorization.
This is the C++ version:
http://shootout.alioth.debian.org/u32/program.php?test=nbody&lang=gpp&id=1
C++ version compiled with:
g++ -Ofast -fomit-frame-pointer -march=native -mfpmath=sse -msse3 --std=c++0x
An input parameter is n= 3_000_000 (but use a larger number if therun time is too much small, like 10 millions or more).
First D2 version (serial):
http://codepad.org/AdRSm2wP
Second D2 version, three times slower thanks to vector ops, more similar to the Fortran version:
http://codepad.org/7O3mz9en
Is someone willing to take two (or more) timings using LDC 2 compiler (I have LDC1 only, beside DMD)? I'd like to know how much time it takes to run the first D version *compared* to the C++ version :-) If you time the second D2 version too, then it's better.
Bye and thank you,
bearophile
More information about the Digitalmars-d-learn
mailing list