D street cred: Just a thought
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Thu Mar 9 08:02:00 PST 2017
On 4/03/2017 7:10 PM, Patrick Schluter wrote:
> The compiler front-end did just that. I can not comment on the quality
> of the code but on the speed of compilation, wow, just wow.
>
> Building v2.067 takes 1'38" on the server at work (westmere at 2.2 GHz,
> gcc 6.2, dmd v2.073, single core build).
> Building v2.073 takes 0'15" and most of that time is taken by building
> the backend which is still in C++.
> If that were rewritten in D, I suppose building the compiler would take
> 2 or 3 seconds max.
Yup. And the same exact approach would be applicable to many other
large C++ projects. Most would be easier than converting the D
compiler, because a huge part of the work was perfectly matching the C++
ABI so the glue layer/backend could still be in C++.
I did consider trying this with some other projects but there really
aren't any large C++ projects I work with frequently enough for this to
be worth the time. LLVM would probably be a good project, but without
someone to maintain the fork and zero chance of switching upstream to D,
there isn't much point.
It's worth noting that maintaining an automatically converted fork is
much much less work than maintaining a manually converted fork.
More information about the Digitalmars-d
mailing list