总结常用文档、工具网站
RDMA 使用小总结
本文是将原先发于知乎的琐碎文章进行整理总结。
RDMA 性能优化
Tips and trick to optimize your RDMA code 笔记
Tips and trick to optimize your RDMA code 笔记
原文来源于 RDMAmojo,该文章涵盖了优化 RDMA 时延、吞吐、资源占用等几个方面的优化技巧,非常实用,基本都能在日常开发中用得上。
如何实现一个简单的 HashMap
HashMap 是个 LinkedList<HashMapEntry<K, V>>[], 或 TreeNode<HashMapEntry<K, V>>[]
1. 实现 HashMapEntry
- 顺便重写下 equal 和 hashcode
2. 实现 HashMap 的方法
- hash():计算hash
- get():在相应的
table[hash(key)]中寻找相应的值 - put(): 考虑要不要 resize
- resize(): 扩充 hashmap
- remove()
- 其他可选方法,如 clone,replace 等
3. 考虑并行操作异常
- 在增删改方法添加 modCount 计数,抛出 ConcurrentModificationException 异常
4. 考虑遍历:EntrySet
先实现 Iterator 类
- 实现 hasNext,next
实现 EntrySet 类
- iterator()
- contain()
- remove()
5. 考虑树化
- 在 put 和 remove 中添加符合树化条件的情况,和从树转换回链表的情况
- 实现 TreeNode 类 (具体实现再议)
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new post
1 | $ hexo new "My New Post" |
More info: Writing
Run server
1 | $ hexo server |
More info: Server
Generate static files
1 | $ hexo generate |
More info: Generating
Deploy to remote sites
1 | $ hexo deploy |
More info: Deployment