On 11/03/2012 11:44 AM, David Nadlinger wrote:
However, one guess would be that the LDC build system currently creates a debug
build of druntime and Phobos by default. This is probably enough to create a
significant slowdown in many applications, and AA-heavy code will probably call
quite a few druntime functions.
This definitely needs to be changed, but I guess the best solution would be to
reactivate the -defaultlib/-debuglib mechanism and build two copies of
Phobos/druntime as part of the standard build process.
To test whether this is really the cause for the slowdown, you can just modify
the D_FLAGS variable in CMake accordingly, e.g. set it to -d;-O3;-release.
Done so -- the code speeds up significantly as a result. It's now about on a
par or maybe slightly faster than DMD-compiled code, and much closer to the
GDC-compiled program speed. Thanks for the thought!
Can I suggest adding a "release" option to the LDC build config? Something that
would allow you to do e.g. cmake -release or make -release depending on which is
more convenient, and have appropriate CFLAGS, CXXFLAGS and D_FLAGS chosen.
--