A few numbers on allocation in dmd

NilsLankila NilsLankila at gmx.us
Wed Jul 1 08:15:12 UTC 2020


On Wednesday, 1 July 2020 at 06:16:42 UTC, Simen Kjærås wrote:
> Could it be there's some template(s) on the form template 
> Foo(T...) { alias Foo = Foo!(...) }? :p
>
> --
>   Simen

There's an alias declaration for each template parameter. It is 
created so that one can refer to the template paramter in the 
scope matching to the template body.

There's already a micro optim for AliasDeclaration, see 
https://github.com/dlang/dmd/pull/11354. It should cut the use by 
25% (so the number for AliasDecl *only*), minus the problem of 
allocations blocks, so maybe more 10% to 20% IRL.


More information about the Digitalmars-d mailing list