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.
This commit is contained in:
2015-04-11 23:36:37 +10:00
parent 7447a0173c
commit ccf44c400c
3 changed files with 16 additions and 6 deletions

View File

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