Compilation times and idiomatic D code

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 7 06:32:24 PDT 2017


On 7/5/17 5:24 PM, H. S. Teoh via Digitalmars-d wrote:
> On Wed, Jul 05, 2017 at 09:18:45PM +0000, jmh530 via Digitalmars-d wrote:
>> On Wednesday, 5 July 2017 at 20:32:08 UTC, Stefan Koch wrote:
>>>
>>> Yes there is.
>>> Rainer Schuetze is quite close to a solution. Which reduces the
>>> symbol-name bloat significantly.
>>> See https://github.com/dlang/dmd/pull/5855
> 
> That's very nice.  Hope we will get this through sooner rather than
> later!

I'm super-psyched this has moved from "proof of concept" to ready for 
review. Kudos to Rainer for his work on this! Has been a PITA for a while:

https://issues.dlang.org/show_bug.cgi?id=15831
https://forum.dlang.org/post/n96k3g$ka5$1@digitalmars.com

> In any case, I think the actual compilation times would depend on the
> details of the code.  If you're using relatively shallow UFCS chains,
> like Phobos unittests tend to do, probably the compressed symbols won't
> give very much advantage over the cost of computing the compression.
> But if you have heavy usage of UFCS like in my code, this should cause
> significant speedups from not having to operate on 300KB large symbols.

I have found that the linker gets REALLY slow when the symbols get 
large. So it's not necessarily the compiler that's slow for this.

-Steve


More information about the Digitalmars-d mailing list