~/talk

How shit works: the CPU

slides:none on file

Generates a 32KB random byte array, then benchmarks iterating and summing positives before and after sorting using JMH and finds the sorted version runs about 10× faster; explanation ties the speedup to predictable branches and the CPU prefetcher. Notes memory latency ~60 ns ≈ 250 cycles, L1 cache hits at ~4–5 cycles, and that caches move data in cache line = 64 bytes chunks. Shows a 4K image transpose where blocking (tiles) improves throughput up to ~2.37× by reducing cache thrash.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Performance puzzle
  3. 3:33CPU complexity
  4. 7:02CPU architecture
  5. 10:34Execution units
  6. 11:18CPU pipelining
  7. 16:35Pipeline stalls
  8. 16:56Memory latency
  9. 19:27CPU cache hierarchy
  10. 23:20Cache-friendly code
  11. 28:19Branch prediction
  12. 31:31Sorted data advantage
  13. 34:15Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.