D import idiom compilation time

SrMordred patric.dexheimer at gmail.com
Thu Jan 3 23:54:42 UTC 2019


There is a veredict about the compilation speedup of the "New 
Import Idiom"?

Currently i´m using it this way:

struct _std
{
   template opDispatch(string moduleName)
   {
     mixin("import opDispatch = std." ~ moduleName ~ ";");
   }
}
...
//if used single time on scope.
_std.algorithm.max(a,b);

My question is that, in the long run, this will be worth the 
compilation time gains, or is just negligible and I should just 
import the normal way.
(and keep the code more sane)

Thanks!


More information about the Digitalmars-d mailing list