Low-overhead components
Vladimir Panteleev
vladimir at thecybershadow.net
Wed Jul 31 07:10:42 PDT 2013
On Wednesday, 31 July 2013 at 08:04:35 UTC, Kagamin wrote:
> On Tuesday, 30 July 2013 at 16:48:42 UTC, Vladimir Panteleev
> wrote:
>> In most cases, only one template instance will be "hot" at one
>> time, so I don't think it would be a problem in general.
>
> You need to load templates from disk.
Loaded from a memory-mapped file, to be precise. Linkers can
optimize the layout of your program to put rarely-used templates
somewhere where they won't be loaded from the disk until they're
needed. (Do you think a 500MB executable installer gets loaded
into RAM entirely before it can run?) But it's not like there
will be a thousand XML parser instantiations in the same program.
> I'm thinking about Adobe products, though I don't know why
> they're so huge and why they start so slow.
I doubt it has anything to do with template bloat.
> Do you mean referring to the mixin doesn't include mixins
> nested into it?
Why would you nest mixins? That's the worst of both worlds.
More information about the Digitalmars-d
mailing list