摘要: 文件:zmoalloc.h zmoalloc.c 1.求两个整数的余数 eg: 求_n对sizeof(long)的余数(_n&(sizeof(long)-1)), 性能提升为50%~100% 左右。 阅读全文
posted @ 2019-09-27 21:14 water_bear 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(188) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(127) 评论(0) 推荐(0) 编辑
摘要: https://github.com/paudley/lru_cache 阅读全文
posted @ 2019-09-12 18:05 water_bear 阅读(83) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-08-23 09:07 water_bear 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.jianshu.com/p/01601515ca31 《大规模C++程序设计》 函数接口: 1.运算符或非运算符函数? 2.自由或成员运算符? 3.虚函数或非虚函数? 4.纯虚成员函数或非纯虚成员函数? 5.静态或非静态成员函数? 6.const 或非const 成员函 阅读全文
posted @ 2019-08-22 08:57 water_bear 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 计算机书籍控 http://bestcbooks.com/recommend/most-influential-book/ 阅读全文
posted @ 2019-08-09 09:18 water_bear 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 编程: 即时通讯网:http://www.52im.net/ c++参考手册: https://zh.cppreference.com/w/ https://www.learncpp.com/cpp-tutorial/46-typedefs-and-type-aliases/ c++技巧社区:htt 阅读全文
posted @ 2019-06-06 17:45 water_bear 阅读(687) 评论(0) 推荐(0) 编辑