Basic benchmark
Tomas Lindquist Olsen
tomas at famolsen.dk
Sat Dec 13 08:16:28 PST 2008
bearophile wrote:
> I have adapted another small benchmark to D. This benchmark is less interesting than the other ones because it mostly tests the optimizations done by the back-end. This means it's not a problem of the D language or its front-end, so even if DMD here shows to be not much efficient, LDC once finished may show significant improvements.
> As usual I may have done several errors, so keep your eyes open.
>
..snip..
>
> Timings:
>
> C gcc:
> Long arithmetic: 11.15 s
> Nested Loops: 0.11 s
>
> D dmd:
> Long arithmetic: 63.7 s
> Nested Loops: 6.17 s
>
> Bye,
> bearophile
I tried this out with Tango + DMD 1.033, Tango + LDC r847 and GCC 4.3.2, my timings are as
follows, best of three:
$ dmd bench.d -O -release -inline
long arith: 55630 ms
nested loop: 5090 ms
$ ldc bench.d -O3 -release -inline
long arith: 13870 ms
nested loop: 120 ms
$ gcc bench.c -O3 -s -fomit-frame-pointer
long arith: 13600 ms
nested loop: 170 ms
My cpu is: Athlon64 X2 3800+
More information about the Digitalmars-d
mailing list