summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/dict.h
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2017-05-30 17:48:41 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-06-01 11:26:33 +0000
commit244daeb77b159c96fd7ecaac7eb1bea7b4bac23a (patch)
treedd1a03b902776c5cc01cdf6b4b48fcc07d6957a6 /libglusterfs/src/dict.h
parent6b36b162f45c4dfeb5eac21e3d77a27216e089bc (diff)
dict: add a simple hash comparision of keys before strcmp for performance
Updates #220 Change-Id: I03b1d2fac2dfcdd21bdf4e4fff19d49425699931 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: https://review.gluster.org/6450 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'libglusterfs/src/dict.h')
-rw-r--r--libglusterfs/src/dict.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/dict.h b/libglusterfs/src/dict.h
index bef58e102cc..0ce6ab8e2e3 100644
--- a/libglusterfs/src/dict.h
+++ b/libglusterfs/src/dict.h
@@ -75,6 +75,7 @@ struct _data_pair {
struct _data_pair *next;
data_t *value;
char *key;
+ uint32_t key_hash;
};
struct _dict {