Decreasing the Number of Memory Accesses: The Compiler’s Secret Life 2/2

Decreasing the Number of Memory Accesses: The Compiler’s Secret Life 2/2

We investigate memory loads and stores that the compiler inserts for us without our knowledge: “the compiler’s secret life”. We show that these loads and stores, although necessary for the compiler are not necessary for the correct functioning of our program. And finally, we explain how you can improve the performance of your program by removing them.

The price of dynamic memory: Memory Access

The price of dynamic memory: Memory Access

If your program uses dynamic memory, its speed will depend on allocation time but also on memory access time. Here we investigate how memory access time depends on the memory layout of your data structure. We also investigate ways to speed up your program by laying out your data structure optimally.