summaryrefslogtreecommitdiffstats
path: root/src/hashtable.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2016-05-12 02:32:55 +0200
committerGravatar Nikias Bassen2016-05-12 02:32:55 +0200
commit2af7318239c59555869d018bc355fe0e21d900c6 (patch)
tree3b366f10c04d305c9bd72e31e28ca62596ba07dd /src/hashtable.h
parent6ab7e301f1854fd18891ddfeaa64e7485be990ba (diff)
downloadlibplist-2af7318239c59555869d018bc355fe0e21d900c6.tar.gz
libplist-2af7318239c59555869d018bc355fe0e21d900c6.tar.bz2
bplist: Speed up plist_to_bin conversion for large plists
Using a better hashing algorithm and a larger hash table the conversion is A LOT faster when processing large plists. Thanks to Xiao Deng for reporting this issue and suggesting a fix.
Diffstat (limited to 'src/hashtable.h')
-rw-r--r--src/hashtable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hashtable.h b/src/hashtable.h
index c28de91..60a40ab 100644
--- a/src/hashtable.h
+++ b/src/hashtable.h
@@ -32,7 +32,7 @@ typedef unsigned int(*hash_func_t)(const void* key);
typedef int (*compare_func_t)(const void *a, const void *b);
typedef struct hashtable_t {
- hashentry_t *entries[256];
+ hashentry_t *entries[4096];
size_t count;
hash_func_t hash_func;
compare_func_t compare_func;