Server Graphs by Aaron Parecki

(More) Latency Numbers Every Programmer Should Know

Dan Hon
3 min readSep 5, 2018

--

The best, most effective programmers have an understanding of how long computers take to perform certain key operations.

This information is known as latency numbers. Programmers should memorize them: knowing them helps create better programs and better experiences for users.

For example, it takes:

  • 1 nanosecond to reference a CPU’s Level 1 cache
  • 3 nanoseconds for a CPU branch mispredict (but let’s not think about the security implications!)
  • 100 nanoseconds to reference something in main memory
  • 88 nanoseconds to send 2,000 bytes over a network
  • 16,000 nanoseconds to read random information from a solid-state drive (an SSD)
  • 150,000,000 nanoseconds to send a network packet from California to the Netherlands and receive a reply

But knowing the latency of computer operations isn’t everything. It’s important to know how long other things take in tech, too.

It takes:

  • 10 seconds for a Hacker News comment claiming the idea for your product is unoriginal and unlikely to succeed
  • 90 seconds to reboot your 2018 Macbook Pro because the Touchbar froze again
  • 10 minutes to get feedback from people outside the tech world about your terrible “Uber, but for bodegas” idea
  • 20 minutes from the end of the WWDC keynote for your non-technical co-founder to Slack you a Verge article, asking you to implement a new iOS feature that doesn’t make any sense
  • 30 minutes for an ecosystem algorithm change to be pushed into production
  • 45 minutes for that algorithm change to destroy your business
  • 1–2 hours to have a replacement Apple USB-C power adapter delivered to your hotel because you forgot to pack one
  • 3 hours to drive to Sand Hill Road and deliver your pitch
  • 9 months for one particular VC to do the honorable thing and give you a clear no
  • 36 hours for the Series A wire to clear from your VC’s bank — remember, it doesn’t count until the money’s in the bank!
  • 3–10 days for interim funding checks from seed investors to clear — it still doesn’t count until the money’s in the bank!
  • 4 weeks for you to notice that the algorithm change may have destroyed your business
  • 9 months for you to accept that you can’t prevent Facebook cloning your product
  • 15 days for you to reject a face-saving acquihire from Microsoft
  • 18 months of disappearing revenue for you to accept that an algorithm change has destroyed your business
  • 2.5 years for you to exhaust your runway and painfully learn that your startup was too early, or that you didn’t have the right product/market fit
  • 3 months for you to pivot to an entirely different concept
  • 10 years for the press to call your now-successful “startup” an “overnight success”

Lastly, here’s the most important latency number all programmers need to know. It should take:

  • 2 seconds for your leadership to realize they should ban Nazis from your platform.

With thanks to Tom Coates and Matt Haughey.

--

--