2 ms·
Besides SoAs vs AoSs (which is my understanding is the most impactful thing you can do to make many use cases more cache friendly), are there other things you m
by hoten 3y ago
Besides SoAs vs AoSs (which is my understanding is the most impactful thing you can do to make many use cases more cache friendly), are there other things you might suggest? Or articles?
- charcircuit 3y agoFor example properly understanding the trade offs with IPC to influence both the architecture of the components of your system and when and how you talk to the other components. Having to switch to the kernel or to other processes can get your data kicked out of caches.
- jzwinck 3y agoReduce your working set. Make frequently used data and instructions as small and contiguous as possible. Reuse memory, e.g. store two large objects in a variant if you don't need them at the same time, or instead of calling free() keep the pointer until you need space again. Don't let templates bloat your instruction count. Be open to creating custom data structures when the standard library ones aren't optimal for you.