Bug 18656 – Compile DUB with LDC

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
installer
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-24T06:09:46Z
Last change time
2020-04-08T10:52:29Z
Assigned to
No Owner
Creator
Seb

Comments

Comment #0 by greensunny12 — 2018-03-24T06:09:46Z
Compiling DUB with all compilers yields to these binaries: Compiler | Size ---------|------ DMD | 17M LDC | 13M GDC | 19M See also: https://github.com/dlang/dub/pull/1369#discussion_r167407362 Note that LDC has LTO easily available which results in ~10% performance improvement and also a noticeable binary size reduction. DUB is currently compiled with DMD, because LDC doesn't support showing the stack for exceptions, but imho the vast increase in speed and reduced side justifies overlooking this. After all, this is a production release - not a debug build. Performance-wise I haven't done big tests, but a build of vibe.d without needing to rebuild goes reproducible down from 0.22s to 0.15s
Comment #1 by greensunny12 — 2018-03-24T06:18:30Z
Comment #2 by dfj1esp02 — 2018-03-26T09:52:52Z
Do you use phobos compiled for LTO too?
Comment #3 by greensunny12 — 2018-03-26T10:02:20Z
> Do you use phobos compiled for LTO too? Not for this quick benchmark - the main point of this issue was just to point out that we should be using LDC for building the DUB binaries due to smaller size + better performance (though to be fair I don't have good numbers for this and it's partially backed up by prior DMD vs. LDC benchmarks).
Comment #4 by pro.mathias.lang — 2020-04-08T10:52:29Z
This sounds like a DUB issue, and has been fixed in DUB a while ago.