Writing Cache-Friendly C++
When you need a container, pick
std::vector<T> by default. This is common advice.
std::vector<T> is cache-friendly.
This talk will quickly explain what it means, why it is so important, and how to write cache-friendly code yourself. We will look at the design and implementation of awesome cache-friendly containers the standard library lacks, a range of tricks (and hacks) to fit as many objects into the cache as possible, as well as big picture structural program changes for data oriented design.
This will be a practical hands-on talk featuring a lot of code and benchmarks. Everything implementation presented is available in a library for you to use.
- CPU Caches and Why You Care — Scott Meyers
- Designing for Efficient Cache Usage — Scott McMillan
- You Can Do Better than std::unordered_map: New Improvements to Hash Table Performance
- Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step — Matt Kulukundis
- Data-Oriented Design and C++
- Designing and Implementing a New Allocator Model — Jonathan Müller
- Code alignment issues
- C++ benchmark – std::vector VS std::list VS std::deque
- E-Book: Data Oriented Design