How fast is D compilation compared to C++?

Imperatorn johan_forsberg_86 at hotmail.com
Sat Sep 24 08:49:46 UTC 2022


On Tuesday, 20 September 2022 at 16:13:30 UTC, Ali Çehreli wrote:
> D's CTFE can make D compilation infinitely slow. Let's put 
> anomalous cases aside...
>
> We say D compiles much faster than C++. Does anyone have any 
> measurement or a gut feeling about the same program written in 
> idiomatic C++ vs. idiomatic D? I think it may be 30 seconds vs. 
> 5 seconds. I that a fair guess?
>
> Although a ballpark figure is good enough, precise measurements 
> would be useful as well.
>
> Thank you,
> Ali

This is something we should emphasize more when talking about D.

I have been in D for some years now, and I still don't understand 
why it never really seems to "catch on". It's ready now, I would 
consider using it in production.

I think before I was too focused on trying to find a c(pp) 
replacement for embedded, but I now think the world isn't ready 
yet to replace C, it might not happen in 30 years.

But other than that, D is superior in many ways. The language 
itself is ready, the ecosystem and IDE (maybe this is better now 
as well) are the only things holding it back. Or maybe just 
ecosystem then, which comes with a bigger community. People need 
to understand that D is a serious option. I get the impression in 
various contexts that for some reason, people think D is not 
ready for serious enterprise use. But I never got an explanation 
to why it wouldn't.

It's one of the 10 greatest mysteries of the world.




More information about the Digitalmars-d mailing list