Program that produces a textual representation of the Mandelbrot set.
text/x-dsrc
221829
Comments
Comment #0 by bearophile_hugs — 2014-01-02T08:44:38Z
Created attachment 1309
Program that produces a textual representation of the Mandelbrot set.
The very C-style program in attach compiles in less than 0.4 seconds with "dmd
-release -noboundscheck" (dmd 2.064), but it takes more than one hour (I have
measured about 68 minutes on the same PC) if I add the "-O" switch.
The same program with ldc2 "ldmd2 -release -noboundscheck" compiles in about
1.9 seconds, and in 6.9 seconds if I add "-O". (and the runtime of this
ldc2-compile is almost half as the optimized dmd-compile).
A very similar C program is compiled by GCC 4.8 with "gcc -O3" in about 6.7
seconds.
So I think there is some problem in dmd with -O.
Comment #1 by bearophile_hugs — 2014-01-02T08:50:48Z
(In reply to comment #0)
> but it takes more than one hour (I have
> measured about 68 minutes on the same PC) if I add the "-O" switch.
>
> The same program with ldc2 "ldmd2 -release -noboundscheck" compiles in about
> 1.9 seconds, and in 6.9 seconds if I add "-O".
It means dmd here compiles about 600 times slower than ldc2, despite ldc2 optimizes more the program.
Comment #2 by lomereiter — 2014-01-02T12:23:29Z
*** This issue has been marked as a duplicate of issue 7157 ***