How efficient is typeof
when dealing with complex expressions?
Specifically, in the two cases:
complex expressions that consist entirely of constant parts needing no CTFE to evaluate
complex expressions that need to
mixin()
a CTFE'ed string.
I don't know if it's fundamentally different but those are the two cases that concern me.
It depends, if you are interest in run time efficiency or compile time efficiency.
typeof(expr)
has zero run time overhead it is completly evaluated at compile time.Compile time complexity is a quite low, so you generaly does not need to worried about it.