Skip to content

Instantly share code, notes, and snippets.

@wodeguaiguai
wodeguaiguai / listen1_aha_playlist.md
Last active October 31, 2023 08:24
updated by Listen1(https://listen1.github.io/listen1/) at 2023/10/31下午4:24:38

本歌单由Listen1创建, 歌曲数:530,歌单数:1,点击查看更多

@wodeguaiguai
wodeguaiguai / update.py
Last active January 3, 2020 15:08
update.py
# -*- coding: utf-8 -*-
# update.py
# @author wodeguaiguai
# @description
# @created 2020-01-02T21:49:39.000Z+08:00
# @last-modified 2020-01-03T23:08:13.251Z+08:00
#
import os
import sys
@wodeguaiguai
wodeguaiguai / latency.markdown
Created February 23, 2019 16:43 — 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