Is dmd fast?
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 22 12:20:42 PDT 2016
On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote:
> Walter and we as a community often claim that dmd is fast as in
> "compiles quickly". Go also claims this. Rust does not. They
> even state that compilation speed is one of the big tasks they
> are working on.
>
> From the general sentiment, I would expect that dmd performs on
> the level of Go and Rust being slower.
>
> Now, D as a language supports arbitrary compile-time
> computation so dmd can be arbitrarily slow. We need to look at
> the benchmark carefully. I started with the canonical Hello
> World. Here are some numbers:
>
> Dash 0:00:00.002366
> Bash 0:00:00.002474
> TCC 0:00:00.007044
> Python2 0:00:00.009881
> Python3 0:00:00.015547
> GCC 0:00:00.028578
> Go 0:00:00.149691
> Rust 0:00:00.212053
> RDMD 0:00:00.275884
> Haskell 0:00:00.310539
> DMD 0:00:00.311102
> Java 0:00:00.596517
> Scala 0:00:01.917606
> X10 Java 0:00:02.484673
> X10 C++ 0:00:03.887826
>
> Hm, Rust is faster than dmd? Go is roughly twice as fast as dmd?
>
> Destroy!
>
> But run your own numbers first:
> https://github.com/qznc/hello-benchmark ;)
You methodology is flawed. You are essentially measuring link
time against the standard lib.
More information about the Digitalmars-d
mailing list