RE: memory alignment vs passing by value
"Jon Watte" <[email protected]> Wed, 1 Dec 2004 18:07:47 -0800
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
> It seems weird that aliasing would be a problem - since everything is in > 4 bytes chunks. From what I understood about aliasing, that only > mattered if you broke dword alignment, e.g. That's CPU register and memory aliasing, which is not the kind of aliasing I'm talking about. In compilers, any access through a pointer might conceivably change the value of the pointer itself (for example), so each time the pointer is accessed, it has to be re-loaded. There are type-based proofs the compiler can execute to not have to do this all the time, but most compilers are quite conservative. A simple disassembly of the two cases should tell you whether this is the case. Cheers, / h+ ------------------------------------------------------- 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