Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/types/typeutil: make Hasher stateless
This CL makes Hasher an empty struct: consequently, Hashers are stateless and all are equivalent. Whatever optimization benefit Hasher had when it was introduced is no longer evident: the benchmark added in this CL went from 5.2ms (using the old hasher) to 3.3ms (without). It also simplifies the API and relaxes the concurrency constraints. Fixes golang/go#69407 Change-Id: Ic6fa54451bee20cba72cd7133cf9afd38e7c3ca8 Reviewed-on: https://go-review.googlesource.com/c/tools/+/612496 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
- Loading branch information