diff options
Diffstat (limited to 'encoding.go')
-rw-r--r-- | encoding.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/encoding.go b/encoding.go index a4af699..343e345 100644 --- a/encoding.go +++ b/encoding.go @@ -197,9 +197,9 @@ func (d *decoder) DecodeStore(s *store) error { s.Length = length - k := 128 - for k < int(s.Length) { - k = k << 1 + k := initialBucketSize + for float64(s.Length)/float64(k) > float64(loadFactor) { + k = k * 2 } s.Bucket = make([]node, k) |