Create class on stack
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 5 19:32:05 PDT 2017
On Sunday, 6 August 2017 at 02:19:19 UTC, FoxyBrown wrote:
> Also, does it do the allocation at compile time(reserve space
> on the stack for the variable along with all the others or does
> it "allocate" space on the stack at runtime?... which is
> slightly slower).
compile time. It works like a static array of the appropriate
size.
though the cost if ti was at runtime is small regardless. I think
it is just a register subtract.
More information about the Digitalmars-d-learn
mailing list