D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18656 - Compile DUB with LDC
Summary: Compile DUB with LDC
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: installer (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-24 06:09 UTC by Seb
Modified: 2020-04-08 10:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Seb 2018-03-24 06:09:46 UTC
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 Seb 2018-03-24 06:18:30 UTC
See also: https://github.com/dlang/dub/issues/1419
Comment 2 anonymous4 2018-03-26 09:52:52 UTC
Do you use phobos compiled for LTO too?
Comment 3 Seb 2018-03-26 10:02:20 UTC
> 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 Mathias LANG 2020-04-08 10:52:29 UTC
This sounds like a DUB issue, and has been fixed in DUB a while ago.