eina: increase hash matching inside of Eina_Hash.

This is the correct implementation of the idea developped in Lucas De Marchi's blog :
http://www.politreco.com/2013/09/optimizing-hash-table-with-kmod-as-testbed/

This give an interesting +15% for all Eina_Hash user whatever hash function they use. The inlined
djb2 is still the fastest one and all other give very close result. It does increase memory foot
print, but as much as the previous way of doing it.
This commit is contained in:
Cedric Bail 2013-12-04 18:29:07 +09:00
parent 3a15c5bbb3
commit df909605c5
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@
#define EINA_HASH_BUCKET_SIZE 8
#define EINA_HASH_SMALL_BUCKET_SIZE 5
#define EINA_HASH_RBTREE_MASK 0xFFF
#define EINA_HASH_RBTREE_MASK 0xFFFFFF
typedef struct _Eina_Hash_Head Eina_Hash_Head;
typedef struct _Eina_Hash_Element Eina_Hash_Element;