C#. Struct design. Why 16 byte is recommended size?
- by maxima120
I read Cwalina book (recommendations on development and design of .NET apps).
He says that good designed struct has to be less than 16 bytes in size (for performance purpose).
My questions is - why exactly is this?
And (more important) can I have larger struct with same efficiency if I run my .NET 3.5 (soon to be .NET 4.0) 64-bit application on i7 under Win7 x64 (is this limitation CPU / OS based)?
Just to stress again - I need as efficient struct as it is possible. I try to keep it in stack all the time, the application is heavily multi-threaded and runs on sub-millisecond intervals, the current size of the struct is 64 byte.