Memory-Bound Benchmarks

Andrey Akinshin · Apress eBooks · 2019

It’s a common situation for memory to be a bottleneck in your code. In this case, it’s very important to understand how memory works on different levels: from CPU to .NET runtime. This knowledge allows designing good benchmarks. On the other hand, if you don’t know some memory “features,” it’s very easy for you to design a wrong benchmark: you can miss an important part of the performance space or measure the performance of some memory-specific things instead of the performance of your code. This chapter contains 12 case studies that show different pitfalls in memory-bound benchmarks. We will discuss some runtime-specific features about garbage collection and its settings; and hardware-specific features like CPU cache and physical memory layout.

Read the paper · More papers on PaperTik