A few numbers on allocation in dmd
Stefan Koch
uplink.coder at googlemail.com
Tue Jun 30 01:58:42 UTC 2020
On Tuesday, 30 June 2020 at 01:54:54 UTC, rikki cattermole wrote:
> On 30/06/2020 1:18 PM, Andrei Alexandrescu wrote:
>> * Any work that reduces the number of TypeIdentifier,
>> TemplateInstance, etc. objects in the first place would help
>> quite a bit.
>
> One strategy that is used with identifiers in dmd is to use a
> table lookup of strings to them. By making them unique, it
> makes them faster overall.
>
> If we could strip out the SLOC out of the TypeIdentifier class,
> this strategy could be used for it.
I would guess TypeIdentifiers being excessively is one of the
side effects of massive template instantiation.
Templates are a crutch when used for meta programming.
It's time we start walking on two strong legs.
More information about the Digitalmars-d
mailing list