On Mon, 06 May 2013 15:01:42 -0400, jerro <[email protected]> wrote:

On Monday, 6 May 2013 at 15:15:47 UTC, Steven Schveighoffer wrote:

Foo.init must exist, and be filled with *something*. Is it useful to FORCE buffer to not have 0 values? Or is it that you don't care what it has? In the latter, is it terrible that it's 0?

I don't care what it contains, I just want to avoid
initialization for performance reasons.

The issue is that bar int in there. The compiler does not generate initialization code that sets up specific members. It basically has an init value, and it memcpy's that thing onto any uninitialized struct.

If you want performance, initialize the memory (all of it) yourself. You can't do any worse :)

-Steve

Reply via email to