Skip to content

Instantly share code, notes, and snippets.

View rsarai's full-sized avatar
🏜️

Rebeca Sarai rsarai

🏜️
View GitHub Profile
@rsarai
rsarai / latency.txt
Created June 10, 2022 00:07 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@rsarai
rsarai / Problem Solving
Created December 3, 2018 16:25 — forked from geek-id/Problem Solving
Problem Solving in Linux
[error]
ImportError: No module named '_gdbm'
[solved]
sudo apt-get install python3.5-gdbm
[error]
ImportError: No module named 'apt_pkg'
[solved]
locate apt_pkg.so
sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-34m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/apt_pkg.so