Hello World
Spiga

归档:2014年07月

你的字典里有多少元素?

2014-07-12 23:42 by 老赵, 22896 visits
摘要:“字典”或者说“哈希表”大家都会用,这真是一个好东西,只要创建了之后就可以不断的丢东西进去,添加删除都是O(1)操作,那叫一个快字了得。不过这里我要再次引用Alan Perlis的名言:“Lisp programmers know the value of everything but the cost of nothing.”,目的是想提醒做事“不要忘记背后的代价”。那么它的代价是什么呢?这里的代价主要是其内存开销。 阅读全文
1
使用Live Messenger联系我