|
-
March 22nd, 2010, 04:31 PM
#7
Re: Adding data to parallel array
As far as the layout in memory is concern, the difference between parallel arrays and an array of structs is essentially:
PA:
AAAAABBBBBCCCCCDDDDD
AoS:
ABCDABCDABCDABCDABCD
The latter is preferable for many reasons, but one obvious one is that you're probably going to use the third A close to the third C, so it would be nice if they were close together in memory so you'd get fewer cache misses.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|