How fast is D compilation compared to C++?
ryuukk_
ryuukk.dev at gmail.com
Thu Sep 22 00:39:35 UTC 2022
On Wednesday, 21 September 2022 at 07:55:22 UTC, Paulo Pinto
wrote:
> On Tuesday, 20 September 2022 at 22:10:52 UTC, ryuukk_ wrote:
>> On Tuesday, 20 September 2022 at 20:41:45 UTC, Ali Çehreli
>> wrote:
>>> On 9/20/22 12:10, Krzysztof Jajeśnica wrote:
>>>
>>> > You should only treat these numbers as very rough estimates,
>>> since I'm
>>> > not exactly comparing apples to apples here.
>>>
>>> Of course. I appreciate your taking time to measure the build
>>> times.
>>>
>>> Ali
>>
>> My game engine, wich is quite big now, compiles in 1second
>> with dmd, ~1.5sec with ldc, in debug build
>>
>> A full clean rebuild!
>>
>> My old c++ game engine project full recompiles in ~30 seconds
>>
>>
>>
>> Long live D!
>
> I advise to eventually cross check those numbers against C++
> modules.
>
> In Visual C++, the C++23 "import std" (which includes the
> complete standard library), is faster than a plain "#include
> <iostream>".
>
> Naturally for the forseable future, C++ modules are something
> that only Visual C++ users can enjoy, as other commercial
> vendors with forks taken out of GCC and clang aren't that keen
> into providing upstream support for better ISO C++ compliance.
I tried C++20 modules when visual studio added support for it
It made a huge improvement, but you still had to forward declare
everything, wich i don't want to do anymore, hence why i quit C++
and rewrote my engine in D, wich is now much larger than the C++
one, and yet still fully compiles in 1sec with dmd (i do not use
phobos, i do use templates and type introspection, with care! i
run my build always with time, so i know whenever i introduce
something that slow things down)
More information about the Digitalmars-d
mailing list