I find it helpful to know the orders of magnitude by which certain computer operations differ. Certainly it is not worth the effort to pay attention to every digit or learn these by heart, especially since they differ (slightly) across systems, but having a basic understanding of what a tiny fraction of time a CPU cycle occupies compared to sending a TCP packet is incredibly helpful whenever reasoning about systems performance.
With the above in mind, below I am citing a list of metrics that proved useful in the past.
Keep in mind that these numbers represent estimates. They will most certainly not match your machine’s performance by the digit, but they will by the orders of magnitude.
|CPU cycle||0.3 ns|||
|Level 1 cache access||0.9 ns|||
|Level 2 cache access||2.8 ns|||
|Level 3 cache access||12.9 ns|||
|Mutex lock/unlock||25 ns|||
|Main memory access||120 ns|||
|Kernel context switch||1-2 μs|||
|Ping on localhost||50 μs|||
|Solid-state disk I/O||50–150 μs|||
|Ping same subnet via 10 GBit||200 μs|||
|Rotational disk I/O||1–10 ms|||
|Ping same subnet via Wifi||3 ms|||
|Internet: San Francisco to New York||40 ms|||
|Internet: San Francisco to United Kingdom||81 ms|||
|Internet: San Francisco to Australia||183 ms|||
I have deliberately not included latencies for atomic operations here as those heavily depend on the CPU architecture, the MESI state of the cache line, whether it is shared across cores or even sockets, the bus speed, memory speed, … I would like to refer those curious for more to the paper “Everything You Always Wanted to Know About Synchronization but Were Afraid to Ask” .
 Gregg, B. (2013). Systems performance: enterprise and the cloud. Pearson Education.
 Dean, Jeff, and P. Norvig. “Latency numbers every programmer should know.” (2012). http://norvig.com/21-days.html#answers
 David, Tudor, Rachid Guerraoui, and Vasileios Trigonakis. “Everything you always wanted to know about synchronization but were afraid to ask.” Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles. ACM, 2013.