5. Memory: Principles
Memory use is one of the trickiest and least understood areas of performance tuning, but it is arguably also one of the most important. At first glance, it doesn’t even seem to be an area for performance at all: either the program fits into memory, or it does not. In fact, that was pretty much exactly how it worked on computers when CPUs were directly connected to memory, before they acquired multilevel memory hierarchies from virtual memory to various CPU caches.
These days, memory is a much more fluid concept. On one hand, virtual memory presents individual processes with isolated address spaces that are multiplexed onto real memory. On the other hand, the CPU can operate at full speed only when accessing a tiny amount ...
Get iOS and macOS™ Performance Tuning: Cocoa®, Cocoa Touch®, Objective-C®, and Swift™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.