Basic benchmark

bearophile bearophileHUGS at lycos.com
Sun Dec 14 06:32:49 PST 2008


Tomas Lindquist Olsen:
> ...
> $ 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
>...

Very nice results.

If you have a little more time I have another small C and D benchmark to offer you, to be tested with GCC and LDC. It's the C version of the "nbody" benchmarks of the Shootout, a very close translation to D (file name "nbody_d1.d") and my faster D version (file name "nbody_d2.d") (the faster D version is relative to DMD compiler, of course).
I haven't tried LDC yet, so I can't be sure of what the timings will tell.

Thank you for your work,
bearophile
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nbody.zip
Type: application/zip
Size: 4337 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20081214/ba14cbca/attachment.zip>


More information about the Digitalmars-d mailing list