The Performance Engineering Mindset: Measure, Don't Guess
Performance engineering is the one area of software where your intuition is most confidently, most consistently wrong — and the entire discipline begins with accepting that. You w…
Performance Engineering of Software Systems (MIT 6.172) covers: The Performance Engineering Mindset, Bentley Rules and Bit Hacks, Programming the Machine, Cache-Efficient and Cache-Oblivious Algorithms, Parallel Performance in Practice. Year 3, Quarter 11. Includes 13 exercises and 2 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
Complete prerequisites first to enroll.
Performance engineering is the one area of software where your intuition is most confidently, most consistently wrong — and the entire discipline begins with accepting that. You w…
Once measurement (lesson 1) has pointed you at a genuine bottleneck, the most fundamental optimization is also the most obvious once stated: do less work. Not "do the same work fa…
Here is the fact that reorganizes everything you thought you knew about performance: on modern hardware, the cost of an operation is dominated not by the operation itself but by w…
The previous lesson delivered the uncomfortable truth: memory access dominates performance, and cache misses cost hundreds of cycles. This lesson delivers the empowering consequen…
You have multiple cores; the question is how to actually use them well — and "well" is harder than it looks, because parallel speedup is easy to leave on the table and easy to acc…
- [ ] Bentley rules: identify optimization opportunities in 5 C functions using work reduction, logic reduction, and loop optimization - [ ] Bit hacks: implement population count,…
- [ ] Cilk parallelism: convert a sequential matrix multiply to parallel using cilkspawn/cilksync, measure speedup on multicore - [ ] Work-span analysis: compute work T1, span Tin…
- [ ] Cache-oblivious algorithm: implement a cache-oblivious matrix transpose and compare performance to naive and cache-aware versions across different cache sizes - [ ] Lock-fre…
- [ ] Performance optimization challenge — Take a provided slow C program (e.g., N-body simulation), profile it, and optimize it to run at least 10x faster using techniques from t…
Take a provided C program that performs matrix operations and is deliberately unoptimized. Profile it using perf/cachegrind, then apply Bentley rules, cache blocking, and Cilk par…
Implement a high-performance storage allocator in C with malloc, free, and realloc. Use a segregated free list with coalescing. Benchmark against glibc malloc on several workloads…
- [ ] What are Bentley's rules for optimizing work? Give 3 examples of each category (work, logic, loop). - [ ] What is work-span analysis? Define work (T1), span (Tinf), and para…
- [ ] Course 11.1 knowledge check passed - [ ] Course 11.2 knowledge check passed - [ ] Course 11.3 knowledge check passed - [ ] Course 11.4 knowledge check passed - [ ] Lox Inter…
13 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.