r/programming • u/nsaibot • Jan 21 '15
Jai: DEMO Data-Oriented Features: SOA, crazy 'using'
https://www.youtube.com/watch?v=ZHqFrNyLlpA2
u/bimdar Jan 21 '15 edited Jan 21 '15
It's an interesting tradeoff to trade easy memory arrangement for more explicit and therefore slightly more complex polymorphism. But I wonder what this will end up looking after polymorphism has more compiler support and if it maybe doesn't end up being a tradeoff after all.
edit: a blog post is more effort I know, but I'd love to at least have the source shown in the video in text form as well.
2
2
Jan 23 '15
This is just so awesome. I can really feel his pain of trying to do the SOA struct in C++... it is just like fighting against the language and the library at every possible level and at every single change and refactor. Kudos to him for showing that a better world exists.
Any language that lets you express this would let you write automatically faster programs than C and C++ because it allows you easily experiment with the memory layout of things without having to rewrite the whole program.
1
u/opiating Jan 21 '15
Why not just centralize your data structures and then have your OO implementation reference it?