Is dmd fast?

qznc via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 22 07:33:26 PDT 2016


On Wednesday, 22 June 2016 at 14:28:19 UTC, Adam D. Ruppe wrote:
> On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote:
>> RDMD         0:00:00.275884
>> DMD          0:00:00.311102
>
>
> Since rdmd is just a script wrapper around dmd, it shouldn't 
> actually be faster.
>
> BTW this more measures linker speed than compiler. dmd -c -o- 
> just runs the compiler and skips filesystem output... it'd be 
> pretty fast and if there's similar options for other compilers 
> (gcc has -c too at least) it might be better for small programs.
>
> Larger programs I think is fair to include the link step, since 
> it should be less a percentage there and you do need to run it 
> anyway.

I agree that this is strange.

It is tricky compare compilation time with Python or Java. Python 
works as in interpreter (with bytecode compilation behind the 
scene). Java does most of the compiling in the JVM and javac is 
pretty stupid.

What I want to get at is actually the "iteration speed", not just 
the "compilation speed". How fast can edit-compile-test your 
program? It might actually be more truthful to use dub (and cargo 
and maven ...), since it is the idiomatic way.


More information about the Digitalmars-d mailing list