3 comments

  • inigyou 20 minutes ago

    Serious question. Does DOD mean anything more than array programming, in practice?

      laladrik 6 minutes ago

      Have a look at the talk Practical Data-Oriented Design by Andrew Kelly [1]. He covers the following techniques:

      1. Indexes instead of pointers. This allows you to avoid alignment of 8 bytes in your structure for x86_64.

      2. Storing booleans out-of-band. Booleans cause padding all the time.

      3. Struct of Arrays. Based on your question I assume you're familiar with it.

      4. Store sparse data in hash maps. I remember one time when it allowed to eliminate inheritance.

      5. Encoding the data instead of OOP/polymorphism. I haven't got an occasion to use it. The idea is to add extra tags to avoid boolean properties.

      [1] - https://vimeo.com/649009599

      RobRivera 15 minutes ago

      Yes