C++ Pointers and Memory in One Hour
by Ana Petrova
The mental model behind every performance problem you have ever failed to explain.
AP Created by Ana Petrova
Every bullet below is something you will have built, shipped or be able to explain by the time you finish the last lesson.
5 modules · 28 lessons · 3h 42m of material
6 lessons running 48m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 lessons running 40m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
6 lessons running 48m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
6 lessons running 46m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 lessons running 40m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.
Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.
5 modules · 28 lessons
3h 42m total length
Short list, and deliberately so. If you meet these you can start today.
Two functions can perform identical work and differ by a factor of ten in runtime. The difference is almost never the instructions, it is memory: where data lives, how it is laid out and how often the processor has to wait for it. This course builds the model that explains those factors.
You begin with the address space: stack frames and why they are fast, the heap and what an allocator does on every call, static and thread-local storage, and virtual memory with pages, the translation lookaside buffer and page faults. Then the cache hierarchy, with a benchmark you run yourself that reveals L1, L2 and L3 boundaries as visible steps on a graph produced from your own machine.
The applied modules turn that into decisions: array of structures versus structure of arrays, alignment and padding, false sharing between threads, prefetching and access patterns, arena and pool allocators, small-buffer optimisation, and how garbage-collected runtimes change the picture in Go, Java and JavaScript. Every claim is measured with perf and cachegrind so the numbers come from your hardware, not from folklore.
Still unsure about something? Write to misteryjj100@gmail.com and a human answers, usually the same working day.
Reviews are written by people who bought this course. We publish the critical ones too.
5.0
Rated 5.0 out of 5Course rating · 2 reviews
Kwame Asante
Performance engineer
Instead of quoting latency figures off a slide, you write the stride benchmark and watch your own machine's cache levels appear as steps in the graph. I have never once forgotten a number I measured myself.
Riikka Mäkinen
Systems developer
I had read about false sharing a dozen times and never quite believed it mattered at my scale. Watching two counters on one cache line wreck a four-thread benchmark, then adding padding and seeing the throughput come back, settled it.
Systems engineer and C++ instructor
Ana spent nine years writing real-time C++ for trading infrastructure before moving into teaching full time. She specialises in the parts of the language people quietly avoid: templates, move semantics, custom allocators and the memory model. Her courses are built around profiling sessions on code that is deliberately slow, so every fix is something you measure rather than memorise. She still contributes to two open-source benchmarking libraries.
One-time payment · lifetime access