How do people feel about putting source compiler directives inside rdmd?

mipri mipri at minimaltype.com
Fri Dec 6 08:51:03 UTC 2019


On Friday, 6 December 2019 at 07:47:33 UTC, Andre Pany wrote:
>
> What is the overhead of dub, if you do not count the first run?
> (the first run compiles the script to an executable, each sub 
> subsequent
> run from now on just calls the executable)

It's calling dmd on every run, even with your patch:

1575620540.004204 execve("/usr/bin/dmd", ["dmd", "-quiet", "-c", 
"-o-", "-v", "long /tmp filename.d"]
1575620540.204598 execve("long tmp filename"

... but that seems to be probePlatform, which stopWatch says
only takes 12ms.

Statting the generated file shows that it's not getting touched,
so it's definitely not getting recompiled.

> Did you compile dub using dmd or ldc? Performance of LDC with 
> optimizations
> on is a lot better than debug builds of dmd.

dmd, but a release build with ldc doesn't decrease this overhead
at all actually.

> Kind regards
> André

It's still a huge improvement. I'll take another look at
the remaining overhead over the weekend.


More information about the Digitalmars-d mailing list