I have translated a C Linpack benchmark to D, and I have timed it compared to the C and a similar Java version.
Some of the D Link-Time optimized (+ interning) versions segfault (binaries produced by DMD here never segfault). The C code compiled with GCC with -msse3 -march=core2 compilation arguments too segfaults (that's why I have used llvm-gcc that has never produced a segfault), I don't know why, it may be a pointer aliasing problem.
For bigger matrices Java shows to be about as fast as gcc-C and LDC-D. Both float and real versions are very slow. Static arrays are a bit faster with LDC but not much, I don't know why.
See inside the zip for the full timings:
|comments: Leave a comment|