3 ms·
"I view this as a fundamental design limitation of C++, one that might someday be fixed with generative meta-programming" As an example of this could be done i
by snicker7 6y ago
"I view this as a fundamental design limitation of C++, one that might someday be fixed with generative meta-programming"
As an example of this could be done in a homoiconic language, refer to Julia's StructArrays.jl [0] package. This package can automagically and transparently convert from AoS to SoA without touching 'business logic'.
Under the hood, this uses the '@generated' macro -- which is essential in a lot of zero-cost abstraction packages, e.g. Blobs.jl [1].
[0]: https://juliahub.com/docs/StructArrays/jRMFC/0.5.0/ https://juliahub.com/docs/StructArrays/jRMFC/0.5.0/
[1]: https://scattered-thoughts.net/writing/zero-copy-deserialization-in-julia/ https://scattered-thoughts.net/writing/zero-copy-deserializa...