From ccf44c400c896761c87836a06be24216c366c87b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Apr 2015 23:36:37 +1000 Subject: BMesh: simplify hashing for dyntopo Was using pointer hashing when the keys are in fact uint's. Since they're well distributed from the rangetree, no need to do bit-shifting tricks. just use int as hash. Gives ~8% speedup in own tests. --- source/blender/blenlib/BLI_ghash.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenlib/BLI_ghash.h') diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h index a00ddeefb2b..f287cf71f53 100644 --- a/source/blender/blenlib/BLI_ghash.h +++ b/source/blender/blenlib/BLI_ghash.h @@ -148,6 +148,7 @@ bool BLI_ghashutil_strcmp(const void *a, const void *b); unsigned int BLI_ghashutil_uinthash(unsigned int key); unsigned int BLI_ghashutil_inthash_p(const void *ptr); unsigned int BLI_ghashutil_inthash_p_murmur(const void *ptr); +unsigned int BLI_ghashutil_inthash_p_simple(const void *ptr); bool BLI_ghashutil_intcmp(const void *a, const void *b); -- cgit v1.2.3