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-map B=5时 bucket num 由 hash 的低 5 位决定 #70

Open
me2seeks opened this issue Mar 10, 2024 · 0 comments
Open

1-map B=5时 bucket num 由 hash 的低 5 位决定 #70

me2seeks opened this issue Mar 10, 2024 · 0 comments

Comments

@me2seeks
Copy link

me2seeks commented Mar 10, 2024

实际描述

B=5时 bucket num 由 hash 的低 5 位决定

  • 原文页码:1-map
  • 原文段落:310-313 行
	// 比如 B=5,那 m 就是31,二进制是全 1
	// 求 bucket num 时,将 hash 与 m 相与,
	// 达到 bucket num 由 hash 的低 8 位决定的效果
	m := uintptr(1)<<h.B - 1

预期描述

B为5时 bucket num 由 hash 的低 5 位决定

	// 比如 B=5,那 m 就是31,二进制是全 1
	// 求 bucket num 时,将 hash 与 m 相与,
	// 达到 bucket num 由 hash 的低 5 位决定的效果
	m := uintptr(1)<<h.B - 1
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