摘要: 启动时:(redis为空) 插入数据量都为100W(100W个key或者list中100W个值,或者1000个key,每个key中1000个值) String Key value # Memory used_memory:121763808 used_memory_human:116.12M used_memory_rss:124956672 used_memory_peak:121762584 used_memory_peak_human:116.12M used_memory_lua:31744 mem_fragmentation_ratio:1.03 mem_allocator:jema 阅读全文
posted @ 2013-12-22 23:24 good90 阅读(29919) 评论(0) 推荐(0) 编辑
摘要: windows:Calculates the wall-clock time used by the calling process. return:The elapsed wall-clock time since the start of the processLinux:The clock() function returns an approximation of processor time used by the program Windows: 1 #include 2 #include 3 #include 4 5 int main() 6 { 7 printf... 阅读全文
posted @ 2013-12-22 23:14 good90 阅读(627) 评论(0) 推荐(0) 编辑
摘要: 快速排序使用分治法(Divide and conquer)策略来把一个串行(list)分为两个子串行(sub-lists)。步骤为:从数列中挑出一个元素,称为 "基准"(pivot),重新排序数列,所有元素比基准值小的摆放在基准前面,所有元素比基准值大的摆在基准的后面(相同的数可以到任一边)。在这个分区退出之后,该基准就处于数列的中间位置。这个称为分区(partition)操作。递归地(recursive)把小于基准值元素的子数列和大于基准值元素的子数列排序。伪码:排序1 QuickSort(A, p, r)2 if p A[j]8 exchange A[i + 1] A[ 阅读全文
posted @ 2013-12-22 20:29 good90 阅读(365) 评论(0) 推荐(0) 编辑