dmd -run speed trends
Witold Baryluk
witold.baryluk at gmail.com
Thu Dec 7 22:19:43 UTC 2023
On Thursday, 7 December 2023 at 21:48:29 UTC, Siarhei Siamashka
wrote:
> On Thursday, 7 December 2023 at 20:39:03 UTC, Witold Baryluk
> wrote:
>> Also for completeness, golang:
>> [...]
>
> For completeness, could you please also try Ruby interpreter
> and Crystal compiler? The same source file is valid for both.
Thanks for the interest.
Nice.
Results from same system the initial numbers were gathered on:
|x|min time [ms]|Notes|
|---|---:|---|
|ruby 3.1.2p20 | 69.5 |
|crystal 1.9.2 (LLVM 14.0.6) | 1471.0 |
| D (ldc2 1.35.0 (DMD v2.105.2, LLVM 16.0.6)) |
821.0 |
Ruby has slightly longer startup than Python, but not too bad. I
expect other purely interpreted languages like Perl, PHP, to have
similar times.
I included ldc2 compiler, to make it easier to compare to crystal.
ldc2 looks similar to dmd. Faster than gdc (this is mostly to be
expected tho), but otherwise similar.
In crystal, it looks like final codegen and linking are
responsible for about 2/3 of the time spent. Maybe switching to
something like gold or mold linker could be help a little. This
should help with dmd too a little.
I also tried to use D `-release` switch, hoping there will be
less to codegen. There is a difference (about 1.5%), but nothing
spectacular.
More information about the Digitalmars-d
mailing list