How to save RAM in D programs (on zero initialized buffers): Reloaded
Kapps
Kapps at NotValidEmail.com
Tue Feb 7 13:13:19 PST 2012
On 07/02/2012 2:11 PM, Nick Sabalausky wrote:
> Is void initialization not good enough?
>
> IIRC it's something like:
>
> ubyte[] buf = void;
>
>
>
This example would be uninitializedArray!(ubyte[])(1024 * 1024).
I would guess that it gives significantly better performance. There's
also minimallyInitializerArray!(ubyte[])(1024 * 1024) that just
initializes the bare data needed to be safe. They're both in std.array.
More information about the Digitalmars-d
mailing list