diff --git a/src/runtime/hashmap.go b/src/runtime/hashmap.go index 60af870fac..df4df053d1 100644 --- a/src/runtime/hashmap.go +++ b/src/runtime/hashmap.go @@ -170,6 +170,19 @@ type hiter struct { checkBucket uintptr } +// bucketShift returns 1<> (sys.PtrSize*8 - 8)) @@ -374,7 +387,7 @@ func mapaccess1(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer { } alg := t.key.alg hash := alg.hash(key, uintptr(h.hash0)) - m := uintptr(1)< 31-bucketCntBits { r += uintptr(fastrand()) << 31 } - it.startBucket = r & (uintptr(1)<> h.B & (bucketCnt - 1)) // iterator state @@ -817,7 +830,7 @@ next: checkBucket = noCheck } bucket++ - if bucket == uintptr(1)<= bucketCnt && uint64(count) >= loadFactorNum*((uint64(1)<= bucketCnt && uintptr(count) >= loadFactorNum*(bucketShift(B)/loadFactorDen) } // tooManyOverflowBuckets reports whether noverflow buckets is too many for a map with 1<