[Issue 14805] Unreasonably slow "new Struct[large]"

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 18 15:23:10 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14805

--- Comment #4 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
(In reply to Ivan Kazmenko from comment #1)
> Maybe it generates an instance of the array at compile time?

it is, indeed. `auto dummy = new Struct[513*513];` can be evaluated in compile
time, and compiler does exactly that. this will also produce a huge .o file
with mostly zeroes (.init) inside.

--


More information about the Digitalmars-d-bugs mailing list