Hacker News new | ask | show | jobs
by LukeShu 1325 days ago
> I've not heard of Go maps being very high load factors, so they probably resize around 50% or so full.

Go uses a load factor of 6.5 (expressed as average load of a bucket; where buckets have a maximum load of 8; i.e. 81% full) (ref: https://github.com/golang/go/blob/go1.19.3/src/runtime/map.g... )

> I’ll assume … doubling on resize

Indeed (ref: https://github.com/golang/go/blob/go1.19.3/src/runtime/map.g...)