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
See also: https://github.com/dlang/dub/issues/1419
Do you use phobos compiled for LTO too?
> 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).
This sounds like a DUB issue, and has been fixed in DUB a while ago.