Speeding up importing Phobos files
Seb
seb at wilzba.ch
Thu Jun 13 09:22:31 UTC 2019
On Saturday, 8 June 2019 at 00:00:17 UTC, Mike Franklin wrote:
> On Friday, 7 June 2019 at 16:38:56 UTC, Seb wrote:
>
>> Reading files is really cheap, evaluating templates and
>> running CTFE isn't. That's why importing Phobos modules is
>> slow - not because of the files it imports, but because of all
>> the CTFE these imports trigger.
>
> Yes that make much more sense to me. But, if that's the case,
> what's all the concern from Walter and Andrei expressed in this
> thread and in the conversations linked below?
>
> https://forum.dlang.org/post/q7dpmg$29oq$1@digitalmars.com
> https://github.com/dlang/druntime/pull/2634#issuecomment-499494019
> https://github.com/dlang/druntime/pull/2222#issuecomment-398390889
>
> Mike
If they wanted to make DMD faster, compiling with LDC would make
it truly faster (more than halfs the runtime!!).
As mentioned above, the real reason for the import overhead are
the ton of templates and CTFE evaluations and these either need
to be cached, made faster, made lazier or reduced if any
significant performance gains are anticipated. Tweaking the file
tree won't help.
More information about the Digitalmars-d
mailing list