Skip to content

Instantly share code, notes, and snippets.

View BohuTANG's full-sized avatar
🏠
Please don't follow me, follow the databend

Bohu BohuTANG

🏠
Please don't follow me, follow the databend
View GitHub Profile
class machine(object):
def __init__(self):
self.inscount = 0
self.storage = []
# CMP: instype 0, k1=pos, k2=byte, k3=switch1(-1), k4=switch2(0), k5=switch3(1)
# KV: instype 1, key, value
def add_inst(self, instype, k1=-1, k2=-1, k3=-1, k4=-1, k5=-1):
if instype == 0:
if k1 < 0: raise
@BohuTANG
BohuTANG / ioarena.txt
Last active November 6, 2015 07:20
Sophia, LMDB, nessDB ioarena benchmarks
https://github.com/BohuTANG/ioarena
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Intel Core i5
Memory: 8 GB
==================================1) small kv tests=================================
number of operations 20,000,000
operations set
@rxaviers
rxaviers / gist:7360908
Last active September 20, 2024 17:33
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jboner
jboner / latency.txt
Last active September 20, 2024 23:33
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
@dspezia
dspezia / Example log
Created April 9, 2012 15:17
Assessing pending activity of a Redis server
> ~/tcp_redis_monitor.py 6379
Timestamp Nb TX bytes RX bytes TX RMA RX RMA
1333983822.943 1 0 0 0.000 0.000
1333983823.193 1 0 0 0.000 0.000
1333983824.194 1 0 0 0.000 0.000
1333983825.195 1 0 0 0.000 0.000
1333983826.196 1 0 0 0.000 0.000