Hi,

In the process of setting up a new development environment, I noticed that DMD's codegen seems to outperform GDC's or LDC's when building DMD itself.

I wrote a test script to measure the time it takes for DMD (built with different compilers) to build Phobos:

http://dump.thecybershadow.net/9e42ff2858d1419cf41108cc50b0a83a/bench.sh

My results are:

dmd: 11.26
ldc: 15.35
gdc: 14.80

Compiler versions:

LDC - the LLVM D compiler (0.17.0):
  based on DMD v2.068.2 and LLVM 3.7.1
gdc (GCC) 5.3.0

GDC/LDC binaries are the ones packaged in Arch Linux. Host DMD is the one installed and chosen by AUTO_BOOTSTRAP (2.068.2). Target DMD/Phobos is from git master and built with ENABLE_RELEASE=1.

To me this seems surprising, especially considering that on Windows I used to get a significant speed increase when building DMD with MSVC instead of DMC.

Reply via email to