Skip to content

Instantly share code, notes, and snippets.

@wenshin
wenshin / cltools.sh
Created July 12, 2017 06:28 — forked from justinbellamy/cltools.sh
Install Autoconf and Automake on OS X El Capitan
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
@wenshin
wenshin / latency.markdown
Last active October 9, 2016 05:13 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

程序员都应该知道的延迟时间

CPU L1 缓存引用 .......................... 0.5 ns
CPU 分支错误预测 ............................ 5 ns
CPU L2 缓存引用 ............................ 7 ns
互斥锁 加锁/解锁 ........................... 25 ns
内存引用 ................................. 100 ns             
Zip 压缩 1K bytes ..................... 3,000 ns  =   3 µs
1 Gbps 网络发送 2K bytes .............. 20,000 ns  =  20 µs
SSD 随机读 ........................... 150,000 ns  = 150 µs

内存连续读 1 MB 数据 .................. 250,000 ns = 250 µs