Use a larger initial hash table if non-hashed argument is large
This commit is contained in:
parent
a9f33c1454
commit
84f3205547
@ -344,7 +344,7 @@ fn hashtab{T, name}(rp:*rty{name}, ip:*T, m:usz, fp:*T, n:usz, links:ity{name})
|
||||
|
||||
log := clzc{m}
|
||||
# Max size
|
||||
msl := clzc{m} + 2
|
||||
msl := max{clzc{m+m/2}+1, min{ux~~14,clzc{m+n/4}}}
|
||||
msz := usz~~1 << msl
|
||||
# Starting log-size
|
||||
sl := msl; if (msl>=14) sl = 12+(msl&1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user