Performance dmd vs ldc2

Chris wendlec at
Wed Jul 24 06:29:01 PDT 2013

On Wednesday, 24 July 2013 at 13:12:46 UTC, John Colvin wrote:
> On Wednesday, 24 July 2013 at 12:49:50 UTC, Chris wrote:
>> On Wednesday, 24 July 2013 at 12:11:50 UTC, bearophile wrote:
>>> Chris:
>>>> ldmd2 compiles the code much faster than ldc2 (~4 secs vs 14 
>>>> secs). The program runs just as fast (as far as I can see at 
>>>> the moment).
>>> The ldmd2 binary is tiny, it's not a compiler, it's just a 
>>> wrapper. If the compilation time is different then they are 
>>> can calling the compiler with different compilation switches.
>>> Bye,
>>> bearophile
>> Thanks for clarifying that. I am still impressed with the 
>> performance. Although I'm sure I could squeeze a bit more out 
>> of dmd. As of now I'm only using the garden-variety (i.e. dmd 
>> -release [files]). I didn't use any switches with ldc2, though.
> try dmd -release -noboundscheck -O -inline [files]
> and the same for ldmd

Just tried it. dmd takes a bit longer to compile. Little or no 
performance gain in executable. Executable with ldmd2 still 
lightning fast in comparison.

I expected a slight gain in performance with ldc2, but nowhere 
near as big a gain as I actually got. Here's a new fan! However, 
the rest of the code (except for the loading bit) seems to work 
as fast with dmd as with ldc2.

What's the story with LDC for Windows?

More information about the digitalmars-d-ldc mailing list