Compilation times and idiomatic D code

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 6 09:26:41 PDT 2017


On Thu, Jul 06, 2017 at 01:32:04PM +0000, Atila Neves via Digitalmars-d wrote:
> On Thursday, 6 July 2017 at 12:00:29 UTC, Jacob Carlborg wrote:
[...]
> > Yeah, it's usually all these D specific compile time features that
> > is slowing down compilation.
> > 
> > DWT and Tango are two good examples of large code bases where very
> > few of these features are used, they're written in a more
> > traditional style.  They're at least 200k lines of code each and,
> > IIRC, takes around 10 seconds (or less) to compile, for a full
> > build.
> 
> IIRC building Tango per package instead of all-at-once got the build
> time down to less than a second.
[...]

Well, obviously D's famed compilation speed must still be applicable
*somewhere*, otherwise we'd be hearing loud complaints. :-D

My point was that D's compile-time features, which are a big draw to me
personally, and also becoming a selling point of D, need improvement in
this area.

I'm very happy to be pointed to Rainer's PR that implements symbol
backreferencing compression.  Apparently it has successfully compressed
the largest symbol generated by Phobos unittests from 30KB (or something
like that) down to about 1100 characters, which, though still on the
large side, is much more reasonable than the present situation.  I hope
this PR will get merged in the near future.


T

-- 
Making non-nullable pointers is just plugging one hole in a cheese grater. -- Walter Bright


More information about the Digitalmars-d mailing list