Speeding up importing Phobos files

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Jan 19 16:21:47 UTC 2019


On Sat, Jan 19, 2019 at 08:59:37AM +0000, Stefan Koch via Digitalmars-d wrote:
> On Saturday, 19 January 2019 at 08:45:27 UTC, Walter Bright wrote:
> > Andrei and I were talking on the phone today, trading ideas about
> > speeding up importation of Phobos files. Any particular D file tends
> > to import much of Phobos, and much of Phobos imports the rest of it.
> > We've both noticed that file size doesn't seem to matter much for
> > importation speed, but file lookups remain slow.
> > 
> > [...]
> 
> If we are going there we might as well use a proper database as the
> compiler cache format.
> similar to to pre-compiled headers.
[...]

I'd like to see us go in this direction.  It could lead to other new
things, like the compiler inferring attributes for all functions (not
just template / auto functions) and storing the inferred attributes in
the precompiled cache.  It could even store additional derived
information not representable in the source that could be used for
program-wide optimization, etc..


T

-- 
Let's call it an accidental feature. -- Larry Wall


More information about the Digitalmars-d mailing list