Problems with dmd inlining
Jason House
jason.james.house at gmail.com
Sun Dec 12 20:44:37 PST 2010
Simen kjaeraas Wrote:
> Jason House <jason.james.house at gmail.com> wrote:
>
> > I wish I had your problems. I ported a sizable set of C++ code to D2 and
> > discovered D2 with dmd was 50x slower than C++ with gcc! I've been to
> > busy/disappointed to track down the bug(s) causing such a slowdown. If
> > anyone is sufficiently inspired to find the bugs, I can make the GPL
> > source code available.
>
> If no-one else has stepped up, I'm willing to have a look.
Thanks Simen. I sent a reply to the e-mail you gave in this newsgroup with the following things:
.tar.gz with c++ source (2178 lines)
.tar.gz with D2 source + ranges (1690 lines)
.tar.gz with D2 source + string mixins (1696 lines)
dmd's -profile output for the range-based version
Very basic description of where the source came from and what it's doing
An svg showing c++ dependency tree built from the #includes
Benchmarking again, it appears I exaggerated. The D2 code compiled with -gc -release -inline -noboundscheck -O is only 33x slower (not 50x). My test this evening was with dmd 2.047 and g++ 4.4.5.
More information about the Digitalmars-d
mailing list