Skip to content

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

Open
@me2seeks

Description

实际描述

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions