new should lower to a template function call

Stefan Koch uplink.coder at googlemail.com
Thu Jul 23 20:04:20 UTC 2020


On Thursday, 23 July 2020 at 19:57:25 UTC, Adam D. Ruppe wrote:
> On Thursday, 23 July 2020 at 18:51:33 UTC, Stefan Koch wrote:
>> In the _worst_ case this can almost double the number of 
>> template instances.
>> I.E. when the new is inside a template itself.
>
> There should be only one new instance per type, and it should 
> be trivially inlined....

It's anyone's guess how many types you actually have.
Template code tends to create a huge number of em.


More information about the Digitalmars-d mailing list