Course
Computer Architecture for Programmers
Hardware awareness for software people — CPU caches, memory hierarchies, branch prediction, data layout, and why performance code looks the way it does.
Reviews
Enrolled members can rate this course.
No reviews yet.
Hardware Reality
The CPU/memory gap, caches, latency, and measurement — the physical model behind every performance rule.
- 01Your Code Runs on PhysicsThe CPU/memory gap explains most counterintuitive performance behavior — learn the latency numbers before reaching for clever algorithms.18mOpen
- 02Caches, Lines, and the Memory HierarchyWhat L1/L2/L3 actually are, why memory moves in 64-byte lines, and how associativity explains strange benchmark cliffs.21mOpen
- 03Measure the Machine: perf, IPC, and Cache MissesHow to use hardware performance counters to separate memory stalls, branch misses, and instruction overhead instead of optimizing blind.24mOpen
Data Layout and Locality
Cache lines, contiguous data, alignment, and allocation patterns that decide whether memory keeps up.
- 01Cache Lines and False SharingWhy two threads can make each other slow without sharing a single variable, and how padding and ownership fix line-level contention.20mOpen
- 02Arrays, Structs, and the Shape of DataWhy contiguous arrays usually beat object graphs, when struct-of-arrays wins over array-of-structs, and how to choose by access pattern.23mOpen
- 03Alignment, Allocation, and PagingThe quiet costs underneath malloc: alignment, allocator behavior, page faults, TLB pressure, and when huge pages or arenas are worth it.22mOpen
Predictable Execution
Branch prediction, vectorization, concurrency, and the habits that make hardware work with you instead of against you.
- 01Branch Prediction and Data-Dependent Control FlowWhy predictable if-statements are nearly free, mispredicts are expensive, and how branchless code helps only in the right situations.21mOpen
- 02SIMD and Vectorization: Width Without WitchcraftHow SIMD lanes work, what compilers need in order to auto-vectorize, and when intrinsics are justified.24mOpen
- 03Concurrency, NUMA, and Memory OrderingWhy adding cores does not linearly add speed, how NUMA placement affects memory latency, and what atomics really cost.26mOpen