Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于1.3.3节hmap的疑问 #3

Open
marjune163 opened this issue Aug 14, 2020 · 0 comments
Open

关于1.3.3节hmap的疑问 #3

marjune163 opened this issue Aug 14, 2020 · 0 comments

Comments

@marjune163
Copy link

marjune163 commented Aug 14, 2020

  1. 确定bucket的index:书上说是用hash的低位与hmap.B取模,是否应该是与2^hmap.B取模?
  2. 增量扩容:32页的图是否B=0更合理?33页的图是否B=1更合理?
  3. 如何确定bucket的某一项是空闲的,因为全0的值也可以是有效的tophash,key或者value?
  4. 完成扩容迁移:从oldbuckets迁移到buckets,项目应该是重新分布在各个bucket中的吧,而不应该还是集中在同一个bucket中?34页的图显示迁移过来的项目仍然集中在一个bucket中。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant