HeadlinesBriefing favicon HeadlinesBriefing.com

Latency Numbers Every Programmer Must Know: Memory, SSD, and Network Speeds

Hacker News •
×

A comprehensive reference of latency numbers reveals the vast performance differences between computer operations. L1 cache references complete in just 1 nanosecond, while main memory access takes 100 nanoseconds - a 100x difference that impacts algorithm design. SSD random reads require 16 microseconds, compared to 12 microseconds for sequential access.

Network operations show even more dramatic disparities. A round trip within the same datacenter takes 500 microseconds, but crossing from California to Netherlands requires 150 milliseconds - a 300x increase. Disk seeks at 1.6 milliseconds are 16,000 times slower than memory access, making them critical bottlenecks in database operations.

These numbers, originally compiled by Jeff Dean and now available as an interactive console tool at late.nz, help developers make informed decisions about system architecture. Understanding that mutex locks take 16 nanoseconds while branch mispredictions cost 3 nanoseconds can guide optimization efforts. The stark contrast between compression speeds and raw memory access times - 741 nanoseconds for 1KB with Snappy versus 2 microseconds for sequential memory reads - demonstrates why choosing the right data structures matters.