Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-24 19:09:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-24 19:09:57 +0400
commitaefe93d909fc41c739d47a7e6a71f0f7d72a5479 (patch)
tree3264e982e71762cb1dfa954bddd49631b6b1f89d /source/blender
parenta31a85ac9cdfb28b0b56a2e445a0f61048730eef (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c2
-rw-r--r--source/blender/blenlib/intern/edgehash.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index a1cbf8a5ce0..06a1347a327 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -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)
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c
index 25db659b3d4..b7f607193a0 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -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)