会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
water_bear
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2019年9月30日
redis笔记_源码_简单动态字符串SDS
摘要: 参照:https://zcheng.ren/sourcecodeanalysis/theannotatedredissourcesds/#sds%E5%B0%8F%E7%BB%93 这里用char buf[] 而不用char* buf 的原因是方便内存释放
阅读全文
posted @ 2019-09-30 20:28 water_bear
阅读(121)
评论(0)
推荐(0)
2019年9月27日
redis笔记_源码_内存分配
摘要: 文件:zmoalloc.h zmoalloc.c 1.求两个整数的余数 eg: 求_n对sizeof(long)的余数(_n&(sizeof(long)-1)), 性能提升为50%~100% 左右。
阅读全文
posted @ 2019-09-27 21:14 water_bear
阅读(165)
评论(0)
推荐(0)
2019年9月26日
redis 资源
摘要: https://github.com/antirez/redis http://try.redis.io/ http://www.redis.cn/documentation.html https://redissrc.readthedocs.io/en/latest/#id3 https://ww
阅读全文
posted @ 2019-09-26 20:53 water_bear
阅读(195)
评论(0)
推荐(0)
2019年9月12日
字典树Trie
摘要: #include <memory> #include <array> #include <string> template<typename Functor> class TrieNode { public: TrieNode(): m_is_end(false), m_pfun(nullptr),
阅读全文
posted @ 2019-09-12 20:26 water_bear
阅读(130)
评论(0)
推荐(0)
转载一个不错的LRU cache
摘要: https://github.com/paudley/lru_cache
阅读全文
posted @ 2019-09-12 18:05 water_bear
阅读(88)
评论(0)
推荐(0)
2019年8月23日
编码经验浓缩成的 10 条最佳实践
只有注册用户登录后才能阅读该文。
阅读全文
posted @ 2019-08-23 09:07 water_bear
阅读(4)
评论(0)
推荐(0)
2019年8月22日
C++ 类设计核查表
摘要: 参考:https://www.jianshu.com/p/01601515ca31 《大规模C++程序设计》 函数接口: 1.运算符或非运算符函数? 2.自由或成员运算符? 3.虚函数或非虚函数? 4.纯虚成员函数或非纯虚成员函数? 5.静态或非静态成员函数? 6.const 或非const 成员函
阅读全文
posted @ 2019-08-22 08:57 water_bear
阅读(207)
评论(0)
推荐(0)
2019年8月9日
编程书籍
摘要: 计算机书籍控 http://bestcbooks.com/recommend/most-influential-book/
阅读全文
posted @ 2019-08-09 09:18 water_bear
阅读(157)
评论(0)
推荐(0)
2019年7月25日
并发模型
摘要: 1.线程池,共享线程安全队列 例子:osmium thread 模块 thread_safe_queue<task> =>work thread1 => ... thread_safe_queue<result> =>work thread n => 2.使用双buffer无锁化 例子:http:/
阅读全文
posted @ 2019-07-25 22:01 water_bear
阅读(185)
评论(0)
推荐(0)
C++ AOP手法
摘要: 1.代理模式 2.模版 3.NVI(non-virtual interface) 参考:https://www.cnblogs.com/qicosmos/p/4772389.html 《effective C++》条款35:考虑virtual函数以外的其他选择
阅读全文
posted @ 2019-07-25 09:09 water_bear
阅读(421)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告