trynova/nova

Implement ShortVec2, ShortVec3, ShortVec4?

Opened this issue · 0 comments

Building on top of #122 we should embrace struct-of-arrays and implement a few SoA types:

struct ShortVec2<T, U>;
struct ShortVec3<T, U, V>;
struct ShortVec4<T, U, V, X>;

The intended use for these is that eg. an Array would use ShortVec2<ElementsVec, Option<ObjectIndex>> as its heap vector backing store; the elements data is stored in one array while the optional backing objects are stored in another. Reading by-index from the array doesn't need to even load the optional object index from memory, unless the indexed access finds a hole.