On inlining in D libraries

Dmitry Olshansky dmitry.olsh at gmail.com
Mon Sep 9 07:32:00 PDT 2013


09-Sep-2013 17:05, Adam D. Ruppe пишет:
> On Monday, 9 September 2013 at 13:01:51 UTC, Dmitry Olshansky wrote:
>> b) Pass all of the interesting files from Phobos on the command line
>> to get them fully scanned for inlining (and get compiled anew each
>> time I guess).
>
> They more or less get compiled anew anyway since there's so many
> templates it has to run through, as well as the web of dependencies
> meaning it reads those files thanks to imports too.

This was my intuition, but currently it won't go beyond templates 
code-gen wise. It however seems to analyze the whole code.

>
> Listing the files could be made easy with the dmd -r people have talked
> about (taking what rdmd does and putting it in the compiler). Then it
> does it automatically.

It would still be a hack.. while I'm looking for a fix (or a 
clarification that we need a hack).

If it was my personal problem I'd "solve" it with:
dmd ~/dmd2/phobos/std/*.d <blah>

maybe even alias it like this. Hm this way I could even inline some of 
druntime...

>
> I doubt you'll see much impact on compile speed.

Agreed.

> Importing a phobos
> module is dog slow already, so it can't get much worse in any case.

And that could be improved.. once it starts going into finer-grained 
imports/packages. The general felling is that it'd be *soon*.


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list