revert bucket size change (edgehash was this way for years, since r26206, ghash since r57657)
having 2 free buckets for each entry is faster but uses more memory. use the original size, best case 3 entries per bucket.
This commit is contained in:
@@ -88,7 +88,7 @@ struct GHash {
|
||||
|
||||
BLI_INLINE bool ghash_test_expand_buckets(const unsigned int nentries, const unsigned int nbuckets)
|
||||
{
|
||||
return (nentries > nbuckets / 2);
|
||||
return (nentries > nbuckets * 3);
|
||||
}
|
||||
|
||||
BLI_INLINE unsigned int ghash_keyhash(GHash *gh, const void *key)
|
||||
|
||||
@@ -88,7 +88,7 @@ struct EdgeHash {
|
||||
|
||||
BLI_INLINE bool edgehash_test_expand_buckets(const unsigned int nentries, const unsigned int nbuckets)
|
||||
{
|
||||
return (nentries > nbuckets / 2);
|
||||
return (nentries > nbuckets * 3);
|
||||
}
|
||||
|
||||
BLI_INLINE unsigned int edgehash_keyhash(EdgeHash *eh, unsigned int v0, unsigned int v1)
|
||||
|
||||
Reference in New Issue
Block a user