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:
Campbell Barton
2013-08-24 15:09:57 +00:00
parent a31a85ac9c
commit aefe93d909
2 changed files with 2 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)