On 6/11/13 4:06 AM, Walter Bright wrote:
This is great information. 71000 instantiations of isNarrowString!!
Definitely need a hash rather than a linear list. I had no idea. You're
right, though, about figuring out a way to avoid this. isNarrowString is
nothing more than:

template isNarrowString(T)
{
enum isNarrowString = (is(T : const char[]) || is(T : const wchar[])) &&
!isAggregateType!T;
}

Makes me wonder why isAggregateType is not 71000 instantiations, too?

Could short-circuiting be the answer?

Maybe we can avoid generating a mangled name for a template if it is an
eponymous one that evaluates to a manifest constant? This will save a
ton of memory.

Awesome. I think it would be fit to have compilation speed and memory consumed a focal point of 2.064. What do you all think?


Andrei

_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to