不得不說,資料結構書上的代碼都是不實際的。C語言的代碼寫得比較少,因此多記錄下有用的代碼。adlist.h:/* adlist.h - A generic doubly linked list implementation * * Copyright (c) 2006-2010, Salvatore Sanfilippo <antirez at gmail dot com> * All rights reserved. * * Redistribution and use in
今天搜了一篇文章《NoSQL Solution: Evaluation and Comparison: MongoDB vs Redis, Tokyo Cabinet, and Berkeley DB 》很巧有中文翻譯版,寫的很詳實,其中作者對MongoDB,推崇備至,但插入2億條資料需要幾個小時,看到這一點我更有信心了,我近1個月剛寫了一個資料庫的雛形,目前在膝上型電腦上1G記憶體的虛擬機器上,插入2億條資料只需數十秒。
在ae.c檔案的aeProcessEvents函數中,針對返回的網路事件有這樣的處理代碼:int rfired = 0; /* note the fe->mask & mask & ... code: maybe an already processed * event removed an element that fired and we still didn't * processed, so we check if the event is still
windows SEVER包:http://code.google.com/p/servicestack/wiki/RedisWindowsDownloadwindows僅用來測試,效能不如在linux下高.c#使用:引用的ServiceStackRedis:https://github.com/mythz/ServiceStack.Redis static void Main(string[] args) { var Redis = new
# By default Redis does not run as a daemon. Use 'yes' if you need it.# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.#Redis預設不是以守護進程的方式運行,可以通過該配置項修改,使用yes啟用守護進程daemonize no# When running daemonized, Redis writes a pid
轉自:http://www.cfanz.cn/?c=article&a=read&id=32677參考 http://www.open-open.com/lib/view/open1351324403395.html http://www.open-open.com/lib/list/354 Spring Data