Latency Numbers every Programmer and Architect should know
Posted by jpluimers on 2016/07/06
Via +Martin Blais, Philippe Beaudoin, Lars Fosdal as Useful resource……:
Hit the cache, Jack…
Interactive Chart of Latency Numbers every Programmer Should Know (from 1990s until 2020s including script to draw the cart).
Also, this variant by Erik Meijer from Coursera (https://www.coursera.org/course/reactive): https://d396qusza40orc.cloudfront.net/reactive/lecture_slides/Latency%20as%20an%20Effect%201.pdf#page=10
Via Asbjørn Heid:
Following up on +Lars Fosdal’s earlier post here’s a talk by Herb Stutter which goes into more detail of where the performance is these days.
It’s a general talk, not C++ specific. Recommend it to get some idea of what goes on under the hood these days, and so one doesn’t try to do some premature optimization which may turn out to be bad.
–jeroen
October 2017 updates thanks to Kristian Köhntopp:
- [WayBack] Latency numbers every programmer should know
- [WayBack] Latency Numbers Every Programmer Should Know
- [WayBack] Latency Numbers, visualised and memorised – The Isoblog.
Table as of 2016:
- 1 ns: L1 cache reference
- 3 ns: Branch mispredict
- 4 ns: L2 cache reference
- 17ns: Mutex lock/unlock
- 100ns: Main memory reference
- 2000ns: Compress 1 kilibyte with Zippy
- 16000ns: SSD random read
- 19000ns: Read 1000000 bytes sequentially from memory
- 500000ns: Round trip in same data center
- 100000ns: Read 1000000 bytes sequentially from SSD
- 3000000ns: Disk seek
- 1000000ns: Read 1000000 bytes sequentially from disk
- 150000000ns: Packet round trip California to the Netherlands
Part of the 2015 numbers:
Related: [WayBack] XKCD – Radiation Dose Chart
Leave a Reply