Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is LDC so much slower than dmd... #830

Open
MartinNowak opened this issue Jan 21, 2015 · 4 comments
Open

Why is LDC so much slower than dmd... #830

MartinNowak opened this issue Jan 21, 2015 · 4 comments

Comments

@MartinNowak
Copy link
Contributor

...and how can we make it faster?

The difference in compilation time is almost 2x, see dub Travis-CI.
I'm a little fed up by dmd's bad optimizer (and codegen bugs), but switching the compiler would be a much simpler choice if LDC compiled debug builds almost as fast as dmd.
I guess you guys know what the problems are. Have you already tried to optimize compile times?

@Trass3r
Copy link
Contributor

Trass3r commented Jan 21, 2015

#539
Almost all of the compile time is spent in llvm.

@HK47196
Copy link

HK47196 commented Jan 29, 2015

FWIW, using a parallel makefile I find ldc to be -much- faster than DMD - LDC's optimized compile times can often beat DMD without optimization when using make. DMD seems to choke on input that isn't grouped together in one pass so it doesn't see much of a speedup at all from parallel make.

@MartinNowak
Copy link
Contributor Author

Really?
That sounds weird because LDC uses the same frontend and also suffers from the overhead of separate compilation. With D's module system, it's inherently more efficient to compile multiple modules at once, because you common imports only get parsed once.

@Temtaime
Copy link
Contributor

Maybe there's some unoptimized IR is passed to llvm ?
There should be a way to reduce compilation time.
I'm new with llvm but'll try to look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants