DIP10005: Dependency-Carrying Declarations is now available for community feedback

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 24 02:54:08 PST 2016


On Saturday, 24 December 2016 at 09:34:03 UTC, Andrei 
Alexandrescu wrote:
> (I confirm that importing std.traits, std.meta, and 
> std.range.primitives together takes 10ms.)

while compiling std.traits 6 files are opened and read into 
memory,
taking roughly 300 microseconds, which is not even 0.3% of the 
time spent.
Lexing them requires additionally also about 300 microseconds.
So Together that makes up 0.6% of the time spent.

The real problem here is _NOT_ opening and lexing files.

It is rather eager parsing and sema.

If that were made more lazy, we could import half of the world 
with noticing impact.

(Which espcially in std.traits, would not make that much of a 
difference since every template in there depends on nearly every 
other template in there)




More information about the Digitalmars-d mailing list