10 de abril de 2026
When you type, click, or call an API, everything feels instantaneous — yet billions of micro‑operations lie underneath. In reality, even the difference between a CPU register and RAM access is like the difference between snapping your fingers and waiting a minute.
Let’s stretch time so every CPU instruction = 1 second. This mental model helps us see just how dramatic latency differences are across hardware layers.
At the fastest end, everything stays within or near the CPU:
+-------------------------------+
| Operation | Scaled Time |
|-------------------------|-------------|
| Register access | 0.3 sec |
| L1 cache hit | 1 sec |
| L2 cache hit | 4 sec |
| L3 cache hit | 12 sec |
| RAM access | 90 sec |
+-------------------------------+
If one instruction takes a second, a jump from L1 cache to RAM takes a minute and a half — a 90× slowdown. This simple comparison shows why caching and cache locality are critical: the closer your data is to the CPU, the more “real time” your software feels.
When operations spill beyond memory, things turn glacial.
+----------------------------------+
| Operation | Scaled Time |
|-------------------------|----------------|
| Context switch | 30 min |
| NVMe SSD read | 5.6 hours |
| SATA SSD read | 27 hours |
| HDD seek + read | 2–4 months |
+----------------------------------+
Now imagine a function that causes disk access because of insufficient caching. In human time, your CPU just took a two-month nap waiting for bytes. This is why swapping, excessive I/O, or non-memory-mapped databases can devastate performance.
The moment we leave the local machine, latency crosses from inconvenient to cosmic.
+----------------------------------+
| Operation | Scaled Time |
|------------------------------------|-----------------|
| Datacenter network RTT | 6 days |
| Internet RTT (same continent) | 1 year |
| SSL handshake (new connection) | 1.6 years |
| Internet RTT (cross-continent) | 5 years |
| Internet RTT (US–Australia) | 8 years |
+----------------------------------+
A single HTTPS connection setup — handshake included — can take the CPU “a year and a half.” It’s no wonder performance engineers obsess over keep‑alive connections, CDNs, and edge caching.
Even on a log scale, the leap from CPU to network operations looks like a trip across galaxies.
Understanding these orders of magnitude isn’t trivia — it informs architectural decisions:
Performance is not just about code — it’s about respecting distance. A perfect algorithm running across continents can’t compete with an average one that stays close to the CPU. Every nanosecond counts, especially when those nanoseconds scale to years.