On 10/06/2011 09:46, Victor T. wrote:
Hi,
I'm looking to try out D2 after reading Andrei's D Programming book. What
implementations are available besides DMD for the windows platform?
I've looked at both GDC and LLVM-LDC but was unable to get either of them
to work at least for version 2 of the language. The precompiled binaries on
the gdc page seems to be for gdc version 1 of the language. LDC doesn't
have any precompiled binaries at all for windows and my attempts to build
it has so far failed.
Any recommendations and advice on this is appreciated. I'm mainly
interested in trying all these alternate implementations to see how well
they can optimize code.
Your best option for D on Windows is dmd right now. It is implicitly
more up to date than GDC/LDC (they both depend on the dmd front end, so
there will inevitably be some amount of lag).
GDC has D2 support and Windows support, I don't believe it offers
pre-compiled binaries for D2 on Windows yet though. It should do in the
near future, as gdc is actively developed, and people have been taking
an interest in Windows support recently.
LDC has alpha, maybe beta support for D2, and is behind dmd releases. It
uses the LLVM backend, which doesn't support exceptions on Windows
currently, so it's not much use. Note that the next release of LLVM will
have support for exceptions on 64-bit Windows, no work has been done for
32 bit though, my guess is that will follow.
As for how well they optimize code, dmd has a state of the art optimizer
from the 90s, or there abouts - the code it generates is pretty speedy,
it has some obvious short comings though (I believe floating point and
inlining are lacking, as well as some more modern optimizations).
GDC optimizes code almost as well as GCC, there are a few notable cases
where it doesn't though - it's a matter of time before these are fixed
though, by which time the code generated will be roughly the same speed
as the equivalent C/C++.
LDC optimizes code roughly as well as clang, and has some D specific
optimizations too (something which GDC is lacking, and DMD too). As far
as I'm aware these are nothing major though.
--
Robert
http://octarineparrot.com/