摘要:
murmurhash的c++版 1 //----------------------------------------------------------------------------- 2 // MurmurHash2, by Austin Appleby 3 4 // Note - This code makes a few assumptions about how your machine behaves - 5 6 // 1. We can read a 4-byte value from any address without crashing 7 // 2. size.. 阅读全文
摘要:
hash 是用于分配值到一或多个存储里,并且为了之后快速检索.如下图,需要插入一个新的item基于hash值,必须在一定时间(当然是越快越好)告知值在哪个块中保存这个是非常慢的hash检索逻辑12345for(i = 0; i in comp.lang.c , October, 1990." in Rich * Salz's USENIX 1992 paper about INN which can be found at * . * * The magic of number 33, i.e. why it works better than many ot... 阅读全文
摘要:
# Redis configuration file example# http://blog.sina.com.cn/s/blog_636415010101970j.html# Note on units: when memory size is needed, it is possible to specify# it in the usual form of 1k 5GB 4M and so forth:## 1k => 1000 bytes# 1kb => 1024 bytes# 1m => 1000000 bytes# 1mb => 1024*1024 byt 阅读全文
摘要:
Monday, 26 August 2013Lock-Based vs Lock-Free Concurrent AlgorithmsLast week I attended a review session of the newJSR166StampedLockrun byHeinz Kabutzat the excellentJCreteunconference. StampedLock is an attempt to address the contention issues that arise in a system when multiple readers concurrent 阅读全文