Object-Oriented Design kills performance in some places. This is something I've been banging my head over for the last few days and decided to create a thread to share what I've found/Maybe others can help.
The basic idea is: Remember what you're programming on. Your CPU is 10-20x faster than your memory. Your CPU also has a little chip of memory called cache. The idea behind DOD is you try to use this memory as much as possible to avoid as many lookups as possible. The most common way to do this you make very very small data objects (important because theres not much cache memory) and put each object in its own giant array of its relevant objects. Then your cache can load this array in and you can just run through it once, instead of jumping all over the place around an array of objects constantly dereferencing shit and making the CPU do all sorts of lookups.
A basic example of this being implemented:
''OOP''
Class dog {
sound bark;
attack bite;
''DOD''
std::vector<sound>
std::vector<bite>
This way it's all organized in a way so when you play your sounds, you just send the sound vector to the sound processor class and it just runs through the vector (preferably &(vector[0]) so it's the raw array) and does what it needs. There is no unnecessary data being passed over.