Skip to content

Instantly share code, notes, and snippets.

@hyunjun
hyunjun / latency.txt
Last active May 11, 2017 15:00 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
memory L1 cache reference 0.5 ns
memory Branch mispredict 5 ns
memory L2 cache reference 7 ns 14x L1 cache
memory Mutex lock/unlock 25 ns
memory Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
network Send 1K bytes over 1 Gbps network 10,000 ns 10 us
disk Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
# download latest libevent2 and tmux sources, and extract them somewhere
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://downloads.sourceforge.net/tmux/tmux-1.7.tar.gz
#
# install deps
yum install gcc kernel-devel make ncurses-devel