3 ms·
> Compiling faster was just a side effect. The location of an import has nothing to do with compilation speed. The only time it would ever make a thing compile
by destructionator 5y ago
> Compiling faster was just a side effect.
The location of an import has nothing to do with compilation speed. The only time it would ever make a thing compile faster is if 1) it is local inside a template function, 2) that template is never actually used, AND 3) the module is never imported anywhere else in the program.
That does happen - I use this pattern for optional dependencies which aren't even looked at if not actually used - but it isn't generally the case. You have to actively think about it to fulfill all three requirements.