Comparing compilation time of random code in C++, D, Go, Pascal and Rust
Nick Sabalausky via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Oct 27 09:56:49 PDT 2016
On 10/27/2016 02:43 AM, Sebastien Alaiwan wrote:
>
> From the article:
>> Surprise: C++ without optimizations is the fastest! A few other
>> surprises: Rust also seems quite competitive here. D starts out
>> comparatively slow."
>
> These benchmarks seem to support the idea that it's not the parsing
> which is slow, but the code generation phase. If code
> generation/optimization is the bottleneck, a "ccache-for-D" ("dcache"?)
> tool might be very beneficial.
>
> (However, then why do C++ standard committee members believe that the
> replacement of text-based #includes with C++ modules ("import") will
> speed up the compilation by one order of magnitude?)
>
How many source files are used? If all the functions are always packed
into one large source file, or just a small handful, then that would
mean the tests are accidentally working around C++'s infamous #include
slowdowns.
More information about the Digitalmars-d-announce
mailing list