Skip to content

Instantly share code, notes, and snippets.

View nafisk's full-sized avatar
💣
blowing up code

Nafis Khan nafisk

💣
blowing up code
View GitHub Profile
@nafisk
nafisk / latency.markdown
Created August 15, 2024 22:32 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@nafisk
nafisk / shell_aliases
Created August 15, 2024 20:12 — forked from hellerbarde/shell_aliases
Shell Aliases
# Be nice to your computer
alias please='sudo'
alias plz='sudo'
# file managing stuff
alias r="PYTHONOPTIMIZE=1 /usr/bin/ranger"
alias l='ls'
alias perm='stat -c %a'
# Dogit

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example