Update on the D-to-Jai guy: We have real problems with the language

Basile B. b2.temp at gmx.com
Mon Nov 28 04:27:03 UTC 2022


On Sunday, 27 November 2022 at 16:38:40 UTC, rikki cattermole 
wrote:
> Today I got some timings after (some how?) fixing dmd builds 
> for my code.
>
> 1) ldc is ~45s
> 2) ldc --link-internally is ~30s
> 3) dmd is ~16s
>
> Note it takes about ~3s to ``dub run dub@~master -- build`` due 
> to needing latest.
>
> So what is interesting about this is MSVC link is taking about 
> ~15s by itself, LLVM is 15s which means that the frontend is 
> actually taking only like 1s at most.
>
> Pretty rough estimates, but all my attempts to speed up my 
> codebase had very little effect as it turns out (including 
> removing hasUDA!).

For better compile times and with LDC people should also always 
use the undocumented option
`--disable-verify` (for a DUB recipe this would go in the 
dlags-ldc2 array for example).

By default ldc2 verifies the IR produced but that verification is 
mostly useful to detect bugs in the AST to IR translation, so 
unlikely to detected any problems for a project like LDC, that's 
well settled, and has the main drawback to be very slow, 
especially with functions with bad a cyclomatic complexity. For 
example for my old iz library, 12KSLOCs of D (per D-Scanner 
critetions), the gain measured with `--disable-verify` goes from 
150 to 300ms, depending on the run.


More information about the Digitalmars-d mailing list