diff options
| author | Alan Donovan <adonovan@google.com> | 2025-03-12 17:12:41 -0400 |
|---|---|---|
| committer | Alan Donovan <adonovan@google.com> | 2026-04-03 08:21:15 -0700 |
| commit | 330aec810997f89262fa04939a00425194e94216 (patch) | |
| tree | 4e7e2e736050b06fadf72865dd2b02cd32801edf /src/cmd/compile/internal/noder | |
| parent | 40ec033c33802cf6e1236ea8030d882338a457d5 (diff) | |
| download | go-330aec810997f89262fa04939a00425194e94216.tar.xz | |
hash/maphash: add Hasher interface and ComparableHasher impl
Hasher is the standard interface for expressing custom hash
functions and equivalence relations for arbitrary data types.
This allows them to be used in hash-based collection types
such as a hash table (CL 612217) or a Bloom filter (CL 740440).
The ComparableHasher type is an implementation of the Hasher
interface for comparable values that is consistent with their
usual equivalence relation (==).
Fixes #70471
Change-Id: Iaa42eb7017d9c4dab487ad6c842c68a81fa7d28a
Reviewed-on: https://go-review.googlesource.com/c/go/+/657296
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder')
0 files changed, 0 insertions, 0 deletions
