memory alignment vs passing by value

"Andras Balogh" <[email protected]> Wed, 1 Dec 2004 14:34:17 -0800
Newsgroups gmane.games.devel.windows
Message-ID <[email protected]>
I don't know about other platforms/compilers, but with MSVC, passing a 4
component floating point vector by value is far more efficient than passing
it as a reference (could anyone explain why this is the case btw?).

One more thing that can help performance is correct alignment in memory.
Problem is, when I my vectors are aligned, then I cannot pass by value
anymore, I'm forced to use reference.

These requirements knock each other out, so what can I do? :)

The interesting thing is that I can still create local variables on the
stack, and they will be correctly aligned, but it cannot align the passed
parameters? Why?


Thanks,


Andras




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555