• Dragonseel@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    I have worked with and build a SoA system. I quite like it. I worked with one written in C++ where your objects were represented by small reference structs and you access all of the real members via static methods. It was done to improve cache access times as often you iterate over a large number of objects but read only a single property (say only the position) of each object. I don’t know how big a performance improvement this actually is, as we don’t have a feature-parity version of AoS lying around. But taken by itself the SoA does not feel less comfortable to work with. Though we make heavy use of a code-generator to not write getter/setter boilerplate.