<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_oveRRed</title><subtitle type="text">         　　　------nessDB and go on...         　　　</subtitle><id>http://feed.cnblogs.com/blog/u/14015/rss</id><updated>2012-01-02T03:20:30Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/14015/rss"/><entry><id>http://www.cnblogs.com/overred/archive/2012/01/02/2310014.html</id><title type="text">[nessDB]开源KV数据库nessDB1.8使用LSM-Tree</title><summary type="text">为了提高随机写和随机读，nessDB1.8开始使用LSM-Tree替换掉B+Tree。源码:https://github.com/shuttler/nessDB/tree/v1.8.1性能测试报告(来自英国测试公司的HarryR):http://paste2.org/p/1844476</summary><published>2012-01-02T03:20:00Z</published><updated>2012-01-02T03:20:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2012/01/02/2310014.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2012/01/02/2310014.html"/><content type="html">&lt;p&gt;为了提高随机写和随机读，nessDB1.8开始使用LSM-Tree替换掉B+Tree。&lt;/p&gt;&lt;p&gt;源码:&lt;a href="https://github.com/shuttler/nessDB/tree/v1.8.1"&gt;https://github.com/shuttler/nessDB/tree/v1.8.1&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;性能测试报告(来自英国测试公司的HarryR):&lt;a href="http://paste2.org/p/1844476"&gt;http://paste2.org/p/1844476&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/2310014.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2012/01/02/2310014.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2011/10/24/nessDB1_7.html</id><title type="text">[nessDB]开源KV数据库nessDB1.7发布，支持Redis协议</title><summary type="text">nessDB是一个小巧、高性能的、支持Redis协议的K-V数据库，使用标准C开发，支持Linux, *BSD, OS X and Solaris 系统，无第三方依赖。描述：* 使用Bloom filter检查数据存在性* 使用Level-LRU提升随机读性能，类似于InnoDB的bufferpool，大小可配置。* 可分布存储的B+Tree索引文件* 支持范围查找* Redis协议支持(PING,GET,SET,DEL,INFO)：SET相同的key即更新；DEL后面跟多key，即批量删除源码目录结构==================././src/ - 源码./BENCHMARK	- .</summary><published>2011-10-24T01:40:00Z</published><updated>2011-10-24T01:40:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2011/10/24/nessDB1_7.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2011/10/24/nessDB1_7.html"/><content type="html">&lt;span  style="font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 11px; line-height: 14px; background-color: #ffffff; "&gt;&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal Monaco, 'Courier New', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; line-height: 1.4em; font-family: 'Bitstream Vera Sans Mono', 'Courier New', monospace; "&gt;&lt;div  id="LC1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;nessDB是一个小巧、高性能的、支持Redis协议的K-V数据库，使用标准C开发，支持Linux, *BSD, OS X and Solaris 系统，无第三方依赖。&lt;/div&gt;&lt;div  id="LC2" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC3" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;描述：&lt;/div&gt;&lt;div  id="LC4" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;* 使用Bloom filter检查数据存在性&lt;/div&gt;&lt;div  id="LC5" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;* 使用Level-LRU提升随机读性能，类似于InnoDB的bufferpool，大小可配置。&lt;/div&gt;&lt;div  id="LC6" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;* 可分布存储的B+Tree索引文件&lt;/div&gt;&lt;div  id="LC7" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;* 支持范围查找&lt;/div&gt;&lt;div  id="LC8" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;* Redis协议支持(PING,GET,SET,DEL,INFO)：SET相同的key即更新；DEL后面跟多key，即批量删除&lt;/div&gt;&lt;div  id="LC9" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC10" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC11" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;源码目录结构&lt;/div&gt;&lt;div  id="LC12" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;==================&lt;/div&gt;&lt;div  id="LC13" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;./&lt;/div&gt;&lt;div  id="LC14" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;./src/ 	- 源码&lt;/div&gt;&lt;div  id="LC15" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;./BENCHMARK	- 性能测试结果&lt;/div&gt;&lt;div  id="LC16" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;./LEVEL-LRU	- Level-LRU小说明&lt;/div&gt;&lt;div  id="LC17" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;./TODO	- TODO list&lt;/div&gt;&lt;div  id="LC18" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;./x/		- 网络层源码&lt;/div&gt;&lt;div  id="LC19" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC20" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC21" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;接口&lt;/div&gt;&lt;div  id="LC22" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;==========&lt;/div&gt;&lt;div  id="LC23" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* db_init(int bufferpool_size,int isbgsync)&lt;/div&gt;&lt;div  id="LC24" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;	bufferpool_size:LRU缓存大小（单位byte)&lt;/div&gt;&lt;div  id="LC25" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;	isbgsync:是否启用后台从内存到磁盘的数据定时刷新（0：否;1:是）&lt;/div&gt;&lt;div  id="LC26" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC27" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* db_get(const char *key)&lt;/div&gt;&lt;div  id="LC28" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* db_get_range(const char *begin,const char *end,struct nobj *obj,int *retcount)&lt;/div&gt;&lt;div  id="LC29" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* db_dump_keys(struct nobj *obj)&lt;/div&gt;&lt;div  id="LC30" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* db_add(const char *key,const char *value)&lt;/div&gt;&lt;div  id="LC31" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* db_update(const char *key,const char *value)&lt;/div&gt;&lt;div  id="LC32" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* db_remove(const char *key)&lt;/div&gt;&lt;div  id="LC33" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC34" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC35" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&lt;/div&gt;&lt;div  id="LC36" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;如何进行性能测试&lt;/div&gt;&lt;div  id="LC37" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;==================&lt;/div&gt;&lt;div  id="LC38" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;	a, $cd src&lt;/div&gt;&lt;div  id="LC39" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;	b, $make&lt;/div&gt;&lt;div  id="LC40" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;	c, $./nessdb-bench add&lt;/div&gt;&lt;div  id="LC41" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC42" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;	最后可使用 "$make cleanall"清理所有数据（包括生成的索引、数据文件）&lt;/div&gt;&lt;div  id="LC43" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC44" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;服务启动&lt;/div&gt;&lt;div  id="LC45" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;===============&lt;/div&gt;&lt;div  id="LC46" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;	* $./nessdb-server&lt;/div&gt;&lt;div  id="LC47" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;	使用redis-cli(或任一款redis客户端)连接，并进行命令操作(目前支持:PING,SET,GET,DEL).&lt;/div&gt;&lt;div  id="LC48" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC49" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;源码地址：&lt;a href="http://github.com/shuttler/nessDB"&gt;http://github.com/shuttler/nessDB&lt;/a&gt;&lt;/div&gt;&lt;div  id="LC50" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&lt;/div&gt;&lt;div  id="LC51" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;希望大家多提意见，以便改进（目前都是基于github issues修改）。&lt;/div&gt;&lt;div  id="LC52" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; "&gt;&amp;nbsp;&amp;nbsp;Thanks!&lt;/div&gt;&lt;/pre&gt;&lt;/span&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/2222288.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2011/10/24/nessDB1_7.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2011/08/11/nessDB.html</id><title type="text">nessDB v1.5测试版发布(使用B+ Tree索引结构)</title><summary type="text">nessDB1.7有了很大的改进，详情见：http://www.cnblogs.com/overred/archive/2011/10/24/nessDB1_7.htmlnessDB v1.5已经启用B+ Tree作为索引结构。Bencnmark results:Benchmark(100,0000entries,10000queries)=========================================================Keys:20byteseachValues:100byteseachEntries:10000000IndexSize:648.5MB(est</summary><published>2011-08-11T14:28:00Z</published><updated>2011-08-11T14:28:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2011/08/11/nessDB.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2011/08/11/nessDB.html"/><content type="html">&lt;div&gt;&lt;span style="color: red; "&gt;&lt;strong&gt;nessDB1.7有了很大的改进，详情见：&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2011/10/24/nessDB1_7.html"&gt;&lt;span style="color: red; "&gt;&lt;strong&gt;http://www.cnblogs.com/overred/archive/2011/10/24/nessDB1_7.html&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;nessDB v1.5已经启用B+ Tree作为索引结构。&amp;nbsp;&lt;/p&gt;&lt;p&gt;Bencnmark results:&lt;/p&gt;&lt;div style="background-color: #F5F5F5;border: 1px solid #CCCCCC;padding-left:5px;padding-right:5px;"&gt;&lt;div&gt;&lt;span style="color: #000000;"&gt;Benchmark(100,0000&amp;nbsp;entries,&amp;nbsp;10000&amp;nbsp;queries)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;=========================================================&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Keys:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&amp;nbsp;bytes&amp;nbsp;each&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Values:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;100&amp;nbsp;bytes&amp;nbsp;each&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Entries:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10000000&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IndexSize:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;648.5&amp;nbsp;MB&amp;nbsp;(estimated)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DataSize:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1030.0&amp;nbsp;MB&amp;nbsp;(estimated)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--------------------------------------------------------------------------------------------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nessDB:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;version&amp;nbsp;1.5(B+&amp;nbsp;Tree)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LRU:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;closed....&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sat&amp;nbsp;Aug&amp;nbsp;27&amp;nbsp;14:47:04&amp;nbsp;2011&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CPU:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;*&amp;nbsp;&amp;nbsp;Intel(R)&amp;nbsp;Pentium(R)&amp;nbsp;Dual&amp;nbsp;&amp;nbsp;CPU&amp;nbsp;&amp;nbsp;T3200&amp;nbsp;&amp;nbsp;@&amp;nbsp;2.00GHz&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CPUCache:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1024&amp;nbsp;KB&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+-----------------------+---------------------------+----------------------------------+---------------------+&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|write&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(succ:10000000):&amp;nbsp;0.000016&amp;nbsp;sec/op;&amp;nbsp;63728.0&amp;nbsp;writes/sec(estimated);&amp;nbsp;10.7&amp;nbsp;MB/sec;&amp;nbsp;cost:156.917(sec)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+-----------------------+---------------------------+----------------------------------+---------------------+&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|readseq&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(found:10000):&amp;nbsp;0.000007&amp;nbsp;sec/op;&amp;nbsp;133891.6&amp;nbsp;reads&amp;nbsp;/sec(estimated);&amp;nbsp;22.5&amp;nbsp;MB/sec;&amp;nbsp;cost:0.075(sec)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+-----------------------+---------------------------+----------------------------------+---------------------+&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|readrandom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(found:10000):&amp;nbsp;0.006636&amp;nbsp;sec/op;&amp;nbsp;150.7&amp;nbsp;reads&amp;nbsp;/sec(estimated);&amp;nbsp;0.0&amp;nbsp;MB/sec;&amp;nbsp;cost:66.361(sec)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+-----------------------+---------------------------+----------------------------------+---------------------+&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Completely&amp;nbsp;Cold-Start(echo&amp;nbsp;3&amp;nbsp;&amp;gt;&amp;nbsp;/proc/sys/vm/drop_caches):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+-----------------------+---------------------------+----------------------------------+---------------------+&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|readseq&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(found:10000):&amp;nbsp;0.000022&amp;nbsp;sec/op;&amp;nbsp;44915.5&amp;nbsp;reads&amp;nbsp;/sec(estimated);&amp;nbsp;7.5&amp;nbsp;MB/sec;&amp;nbsp;cost:0.223(sec)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+-----------------------+---------------------------+----------------------------------+---------------------+&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|readrandom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(found:10000):&amp;nbsp;0.012902&amp;nbsp;sec/op;&amp;nbsp;77.5&amp;nbsp;reads&amp;nbsp;/sec(estimated);&amp;nbsp;0.0&amp;nbsp;MB/sec;&amp;nbsp;cost:129.019(sec)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+-----------------------+---------------------------+----------------------------------+---------------------+&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|removerandom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(found:10000):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.006539&amp;nbsp;sec/op;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;152.9&amp;nbsp;reads&amp;nbsp;/sec(estimated);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.0&amp;nbsp;MB/sec&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;font  face="'Courier New'" size="2"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/2135553.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2011/08/11/nessDB.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2011/05/29/double-array-trie.html</id><title type="text">Double-Array Trie(手绘版)</title><summary type="text"/><published>2011-05-29T10:54:00Z</published><updated>2011-05-29T10:54:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2011/05/29/double-array-trie.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2011/05/29/double-array-trie.html"/><content type="html">&lt;img src="http://images.cnblogs.com/cnblogs_com/overred/Datrie.JPG" width="738" height="1002" alt="" /&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/2062226.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2011/05/29/double-array-trie.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2011/03/19/double-dictionary.html</id><title type="text">《你不常用的c#之九》:双城记（Lock-Free Dictionary Read/Write）</title><summary type="text">此篇写于2009年11月 22日，一直处草稿状态，本想写的更深入些，就这样吧。1）,多线程下如何安全的遍历一个Dictionary?Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&amp;gt;lock(_syncRoot){foreach(stringsinDictionary.Values){//todo耗时操作}}2）,多线程下如何安全遍历一个非常大的Dictionary？ 如果采用1)中的代码，效率是非常低的！ReaderWriterLockSli</summary><published>2011-03-19T03:12:00Z</published><updated>2011-03-19T03:12:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2011/03/19/double-dictionary.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2011/03/19/double-dictionary.html"/><content type="html">&lt;p&gt;&lt;/p&gt;&#xD;
&lt;div&gt;&lt;span style="color: red; "&gt;此篇写于2009年11月 22日，一直处草稿状态，本想写的更深入些，就这样吧。&lt;/span&gt;&lt;/div&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong style="color: red;"&gt;1）,多线程下如何安全的遍历一个Dictionary&lt;/strong&gt;?&lt;br /&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;div style="background-color: #F5F5F5;border: 1px solid #CCCCCC;padding-left:5px;padding-right:5px;"&gt;&lt;!--&lt;br /&gt;&#xD;
&lt;br /&gt;&#xD;
Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;&#xD;
http://www.CodeHighlighter.com/&lt;br /&gt;&#xD;
&lt;br /&gt;&#xD;
--&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;lock&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;(_syncRoot)&lt;br /&gt;&#xD;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&#xD;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;s&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;in&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;Dictionary.Values)&lt;br /&gt;&#xD;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&#xD;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;todo&lt;/span&gt;&lt;span style="color: #008000;"&gt;耗时操作&lt;br /&gt;&#xD;
&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&#xD;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;2）,多线程下如何安全遍历一个非常大的&lt;strong style="color: red;"&gt;Dictionary&lt;/strong&gt;？&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;如果采用&lt;strong&gt;&lt;span style="color: red;"&gt;1)&lt;/span&gt;&lt;/strong&gt;中的代码，效率是非常低的！ReaderWriterLockSlim？也不用。&lt;/p&gt;&#xD;
&lt;p&gt;国民党人总结《论持久战》：以空间换时间，积小胜为大胜。&lt;br /&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;其实在算法上讲，最后一句应该是分治。而前一句&amp;#8220;空间换时间&amp;#8221;在某些情况下也堪称救世良药。&lt;/p&gt;&#xD;
&lt;p&gt;那我们就来个镜像（称为:clone）,对镜像的一切操作均不影响主(main)的任何运行时结构。&lt;br /&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;div style="background-color: #F5F5F5;border: 1px solid #CCCCCC;padding-left:5px;padding-right:5px;"&gt;&lt;!--&lt;br /&gt;&#xD;
&lt;br /&gt;&#xD;
Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;&#xD;
http://www.CodeHighlighter.com/&lt;br /&gt;&#xD;
&lt;br /&gt;&#xD;
--&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dictionary&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;clone&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;Dictionary&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(main);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; 然后遍历clone就可以了:&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;s&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;in&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;clone.Values)&lt;br /&gt;&#xD;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;br /&gt;&#xD;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;todo&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&#xD;
&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/1608173.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2011/03/19/double-dictionary.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2010/12/10/1902660.html</id><title type="text">瓜子皮小袋</title><summary type="text">每次买了包瓜子，还得带个垃圾袋。这次居然忘了，2个小时的车程上很是无聊。像洽洽这种厂商能否在瓜子袋里捎带个薄薄的用于装瓜子皮的小袋呢？可能是我太懒了</summary><published>2010-12-10T13:34:00Z</published><updated>2010-12-10T13:34:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2010/12/10/1902660.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2010/12/10/1902660.html"/><content type="html">&lt;div&gt;&lt;span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; font-size: 12px; color: #555555; "&gt;每次买了包瓜子，还得带个垃圾袋。这次居然忘了，2个小时的车程上很是无聊。像洽洽这种厂商能否在瓜子袋里捎带个薄薄的用于装瓜子皮的小袋呢？可能是我太懒了&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/1902660.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2010/12/10/1902660.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2010/12/10/calculus-matrix.html</id><title type="text">一花一草一世界 一微一积一矩阵</title><summary type="text">物质，运动。我把运动分为有时间的运动，和无时间的运动。从家到公司，花了1个小时，这是有时间的运动。在这个运动过程中，别人是可以看到你的。对位移在时间上求导得出速度，对速度求导得出加速度，对加速度再求导是什么呢？那就是迟到或不迟到！-_-矩阵变换是一种无时间的运动，譬如坐标为(x,y...)的点A经过函数f(x)变换，成为点B(x1,y1...)。在这个“运动”过程中，“别人”是看不到你的，在“别人”看来，“你”是从A点神仙般的变到B点。矩阵是我们在数学上对多维空间的一个表示。蚂蚁在一个平面上爬行，它只能感知前后和左右两个维度，自身无法逃脱那个二维平面，可人可以从各个角度观察这个蚂蚁。我们生活在</summary><published>2010-12-10T13:33:00Z</published><updated>2010-12-10T13:33:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2010/12/10/calculus-matrix.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2010/12/10/calculus-matrix.html"/><content type="html">&lt;div&gt;&lt;span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; font-size: 12px; color: #555555; "&gt;&lt;div&gt;物质，运动。&lt;/div&gt;&lt;div&gt;我把运动分为有时间的运动，和无时间的运动。&lt;/div&gt;&lt;div&gt;从家到公司，花了1个小时，这是有时间的运动。在这个运动过程中，别人是可以看到你的。&lt;/div&gt;&lt;div&gt;对位移在时间上求导得出速度，对速度求导得出加速度，对加速度再求导是什么呢？那就是迟到或不迟到！-_-&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;矩阵变换是一种无时间的运动，譬如坐标为(x,y...)的点A经过函数f(x)变换，成为点B(x1,y1...)。在这个&amp;#8220;运动&amp;#8221;过程中，&amp;#8220;别人&amp;#8221;是看不到你的，在&amp;#8220;别人&amp;#8221;看来，&amp;#8220;你&amp;#8221;是从A点神仙般的变到B点。矩阵是我们在数学上对多维空间的一个表示。&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;蚂蚁在一个平面上爬行，它只能感知前后和左右两个维度，自身无法逃脱那个二维平面，可人可以从各个角度观察这个蚂蚁。&lt;/div&gt;&lt;div&gt;我们生活在一个三维空间里，只能感知上下，左右，前后三个维度，自身也无法逃脱这个空间，是不是生活在四维世界的人可以一览无余的观察我们呢？&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&amp;#8220;在一维世界的人看来，能前后左右移动的人是神，因为他能突然出现又能突然消失（移到直线的左边或右边，直线国的人就看不见你了）；在二维世界的人看来，能上下移动的人是神，因为他能突然出现又突然消失（移到平面的上方或下方，平面国的人就看不见你了）；那在我们这个三维世界能突然出现或消失的是神还是四维世界的人呢？&amp;#8221;&lt;/div&gt;&lt;div&gt;我感觉这是人类进化的一个方向，从三维到四维，不是世界多奇妙，而是我们的大脑不够发达，无法感知。&lt;/div&gt;&lt;div&gt;也许有一天，我们大脑进化到可以感知四维空间，可以感知到空间是扭曲的，那时候你再提相对论，大家会说你没文化，白痴。&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/1902659.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2010/12/10/calculus-matrix.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2010/12/10/quantum-physics.html</id><title type="text">元与连续性</title><summary type="text">1）直线运动，B是A与C之间的中点，从A到C一定经过点B吗？不一定2）温度升高，从30°升到40°，一定经过31.1415926....吗？也不一定空间和能量不是可无限分割的，而是有基本的“元”单位，就如现实中人民币的单位最小是“分”一样，计算机的bit一样。"一尺之棰，日取其半，万世不竭。",这只是一个完美主义罢了，存在于理论中，可现实中未必成立，人们已进入量子时代。那一个物体是如何从A点移到B点的呢？</summary><published>2010-12-10T13:32:00Z</published><updated>2010-12-10T13:32:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2010/12/10/quantum-physics.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2010/12/10/quantum-physics.html"/><content type="html">&lt;div&gt;&lt;span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; font-size: 12px; color: #555555; "&gt;1）直线运动，B是A与C之间的中点，从A到C一定经过点B吗？不一定&lt;br /&gt;2）温度升高，从30&amp;#176;升到40&amp;#176;，一定经过31.1415926....吗？也不一定&lt;br /&gt;空间和能量不是可无限分割的，而是有基本的&amp;#8220;元&amp;#8221;单位，就如现实中人民币的单位最小是&amp;#8220;分&amp;#8221;一样，计算机的bit一样。&lt;br /&gt;"一尺之棰，日取其半，万世不竭。",这只是一个完美主义罢了，存在于理论中，可现实中未必成立，人们已进入量子时代。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 20px; "&gt;那一个物体是如何从A点移到B点的呢？&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/1902658.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2010/12/10/quantum-physics.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2010/12/10/no-seat-bus.html</id><title type="text">无座公交</title><summary type="text">公交车如果不设座位，空间还是挺大的，在早高峰期，某些拥挤线路，可夹杂一些无座公交，以解决着急上班用户的需求（北京）。</summary><published>2010-12-10T13:31:00Z</published><updated>2010-12-10T13:31:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2010/12/10/no-seat-bus.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2010/12/10/no-seat-bus.html"/><content type="html">&lt;div&gt;&lt;span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 20px; font-size: 12px; color: #555555; "&gt;公交车如果不设座位，空间还是挺大的，在早高峰期，某些拥挤线路，可夹杂一些无座公交，以解决着急上班用户的需求（北京）。&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/1902657.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2010/12/10/no-seat-bus.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/overred/archive/2010/12/10/peter-ross.html</id><title type="text">史密斯先生的握手问题</title><summary type="text">此问题由爱丁堡大学的Peter Ross提出。”史密斯先生和他太太邀请四对夫妻来参加晚会。每个人来的时候，房间里的一些人都要与别的一些人握手。当然，每个人都不会与自己的配偶握手，也不会跟同一个人握手两次。之后，史密斯先生问每个人和别人握手几次，他们的答案都不一样。那么，史密斯太太和别人握了几次手呢？“已知信息：1）共10人2）每个人不会与自己的配偶握手且不会跟同一个人握手两次3）每个人（除史密斯先生外）与其他人握手的次数均不相同</summary><published>2010-12-10T13:30:00Z</published><updated>2010-12-10T13:30:00Z</updated><author><name>overred</name><uri>http://www.cnblogs.com/overred/</uri></author><link rel="alternate" href="http://www.cnblogs.com/overred/archive/2010/12/10/peter-ross.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/overred/archive/2010/12/10/peter-ross.html"/><content type="html">&lt;div&gt;&lt;span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 22px; font-size: 12px; color: #555555; "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 20px; "&gt;此问题由爱丁堡大学的Peter Ross提出。&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 20px; "&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 20px; "&gt;&amp;#8221;&lt;span style="background-color: #ffff33; "&gt;史密斯先生和他太太邀请四对夫妻来参加晚会。每个人来的时候，房间里的一些人都要与别的一些人握手。当然，每个人都不会与自己的配偶握手，也不会跟同一个人握手两次。之后，史密斯先生问每个人和别人握手几次，他们的答案都不一样。&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #ffff33; "&gt;那么，史密斯太太和别人握了几次手呢？&lt;/span&gt;&amp;#8220;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 20px; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 20px; "&gt;&lt;strong&gt;已知信息：&lt;br /&gt;1）共10人&lt;br /&gt;2）每个人不会与自己的配偶握手且不会跟同一个人握手两次&lt;br /&gt;3）&lt;span style="color: #ff0000; "&gt;每个人（除史密斯先生外）与其他人握手的次数均不相同&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f4f5f7; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #888888; border-right-color: #888888; border-bottom-color: #888888; border-left-color: #888888; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; white-space: pre-wrap; word-wrap: break-word; width: 565px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span style="color: #666600; "&gt;如果知道每个人都与哪些人握手了，这个问题就解了。根据已知信息可知，其他人（史密斯先生除外）最多握&lt;/span&gt;&lt;span style="color: #006666; "&gt;8&lt;/span&gt;&lt;span style="color: #666600; "&gt;次，最少&lt;/span&gt;&lt;span style="color: #006666; "&gt;0&lt;/span&gt;&lt;span style="color: #666600; "&gt;次。&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #666600; "&gt;进而可知握手&lt;/span&gt;&lt;span style="color: #006666; "&gt;8&lt;/span&gt;&lt;span style="color: #666600; "&gt;次的人的配偶一定是握手&lt;/span&gt;&lt;span style="color: #006666; "&gt;0&lt;/span&gt;&lt;span style="color: #666600; "&gt;次的那个人，依次类推，最后得到答案是&lt;/span&gt;&lt;span style="color: #006666; "&gt;4&lt;/span&gt;&lt;span style="color: #666600; "&gt;次。&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #666600; "&gt;若用矩阵表示则明显。&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style="color: #666600; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/overred/aggbug/1902656.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/overred/archive/2010/12/10/peter-ross.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry></feed>
