Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could do a fairly straightforward conversion but it would be terribly slow for many things.

Is there a non-straightforward conversion that isn't? It seems to me like any SoA->AoS transformation is going to have pretty much the same effect on locality.



> It seems to me like any SoA-AoS transformation is going to have pretty much the same effect on locality

Not at all. In a SoA system you want to operate on each attribute individually but on an AoS system you operates across structs. Besides improved cache locality it keeps loops small so they operate out of the iop loop/stream cache among other things like better packing off data etc.

If you haven't worked on a system little this sometimes it can be difficult to see how different things can be. It's literally APL vs C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: