summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-12-04 18:29:07 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-12-04 18:33:05 +0900
commitdf909605c557035c845cc5f9cfbc2007537e9ef1 (patch)
tree03378249cc9d4df43c9972ef8a0ac56660fa37c8 /src/lib/eina
parent3a15c5bbb3ef0a49616b15cf7ba601eaa53c3034 (diff)
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.
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_hash.c b/src/lib/eina/eina_hash.c
index dab865efe6..274d3e840c 100644
--- a/src/lib/eina/eina_hash.c
+++ b/src/lib/eina/eina_hash.c
@@ -64,7 +64,7 @@
64#define EINA_HASH_BUCKET_SIZE 8 64#define EINA_HASH_BUCKET_SIZE 8
65#define EINA_HASH_SMALL_BUCKET_SIZE 5 65#define EINA_HASH_SMALL_BUCKET_SIZE 5
66 66
67#define EINA_HASH_RBTREE_MASK 0xFFF 67#define EINA_HASH_RBTREE_MASK 0xFFFFFF
68 68
69typedef struct _Eina_Hash_Head Eina_Hash_Head; 69typedef struct _Eina_Hash_Head Eina_Hash_Head;
70typedef struct _Eina_Hash_Element Eina_Hash_Element; 70typedef struct _Eina_Hash_Element Eina_Hash_Element;