logoalt Hacker News

PaulHoule • today at 3:01 PM • 1 reply • view on HN

A nice analysis of large-scale programming techniques that go beyond the novice version of "OO Sux" to the almost secret

https://en.wikipedia.org/wiki/AoS_and_SoA

and why game engines use entity-component systems, analytical databases are column-oriented, etc. That is, the classical organization of "objects" as structures has a lot of overhead when you're doing heavy work. For instance java reifies objects with a big header, a monitor lock, and other stuff that really adds up if you, say, are writing a chess engine and need to maintain transposition tables. And even if you are in C++ and there is a lot less overhead, AoS still has bad mechanical sympathy compared to SoA.


Replies

mac3n • today at 3:57 PM

see Jovial language (https://news.ycombinator.com/item?id=27390796) SERIAL and PARALLEL tables.