www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Enabling data-oriented design

reply Joakim <dlang joakim.fea.st> writes:
I was looking at the most popular videos from CppCon and the 
second-most popular from the last three years is the one on 
data-oriented design:

https://youtube.com/watch?v=1OEu9C51K2A

The wikipedia page has a summary, basically focusing on cache 
effects more, with links to articles:

https://en.wikipedia.org/wiki/Data-oriented_design

Obviously the effects of cache are well-known here and other 
places that focus on performance, but maybe there's more we can 
do to enable this paradigm in the language.
Dec 18 2016
parent reply Stefan Koch <uplink.coder googlemail.com> writes:
On Sunday, 18 December 2016 at 14:22:29 UTC, Joakim wrote:
 I was looking at the most popular videos from CppCon and the 
 second-most popular from the last three years is the one on 
 data-oriented design:

 https://youtube.com/watch?v=1OEu9C51K2A

 The wikipedia page has a summary, basically focusing on cache 
 effects more, with links to articles:

 https://en.wikipedia.org/wiki/Data-oriented_design

 Obviously the effects of cache are well-known here and other 
 places that focus on performance, but maybe there's more we can 
 do to enable this paradigm in the language.
I would not be too sure that this is something the language can help with. It is more a question of the right tools. And In theory features like mixins, introspection and property functions should make it possible to profile your memory-access patterns in a nice way.
Dec 18 2016
parent reply Joakim <dlang joakim.fea.st> writes:
On Sunday, 18 December 2016 at 14:58:53 UTC, Stefan Koch wrote:
 On Sunday, 18 December 2016 at 14:22:29 UTC, Joakim wrote:
 I was looking at the most popular videos from CppCon and the 
 second-most popular from the last three years is the one on 
 data-oriented design:

 https://youtube.com/watch?v=1OEu9C51K2A
Hmm, looks like I pasted a link to the wrong CppCon video, here's the one on data-oriented design: https://youtube.com/watch?v=rX0ItVEVjHc
 The wikipedia page has a summary, basically focusing on cache 
 effects more, with links to articles:

 https://en.wikipedia.org/wiki/Data-oriented_design

 Obviously the effects of cache are well-known here and other 
 places that focus on performance, but maybe there's more we 
 can do to enable this paradigm in the language.
I would not be too sure that this is something the language can help with. It is more a question of the right tools. And In theory features like mixins, introspection and property functions should make it possible to profile your memory-access patterns in a nice way.
One of the arguments for DOD in the WP link and elsewhere is that typically OOP-heavy code, as you see in much game programming, is not conducive to this type of design. To the extent someone is using D's OOP features heavily, they will run into this too. I would imagine ranges are very conducive to the DOD approach, so it's not like D doesn't support it. The question is whether we can support this design trend more.
Dec 18 2016
parent Darren Fielding <darren.fielding hotmail.co.uk> writes:
On Sunday, 18 December 2016 at 16:06:38 UTC, Joakim wrote:
 On Sunday, 18 December 2016 at 14:58:53 UTC, Stefan Koch wrote:
 On Sunday, 18 December 2016 at 14:22:29 UTC, Joakim wrote:
 [...]
Hmm, looks like I pasted a link to the wrong CppCon video, here's the one on data-oriented design: https://youtube.com/watch?v=rX0ItVEVjHc
 [...]
I would not be too sure that this is something the language can help with. It is more a question of the right tools. And In theory features like mixins, introspection and property functions should make it possible to profile your memory-access patterns in a nice way.
One of the arguments for DOD in the WP link and elsewhere is that typically OOP-heavy code, as you see in much game programming, is not conducive to this type of design. To the extent someone is using D's OOP features heavily, they will run into this too. I would imagine ranges are very conducive to the DOD approach, so it's not like D doesn't support it. The question is whether we can support this design trend more.
This is something I'm interested in, too. If you haven't seen them already, Jonathan Blow has videos showing his development of Jai, a language focused on DOD. I would love to see some support or tutorials of DOD in D.
Dec 18 2016