From 2af7318239c59555869d018bc355fe0e21d900c6 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 12 May 2016 02:32:55 +0200 Subject: 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. --- src/hashtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hashtable.h') 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; -- cgit v1.1-32-gdbae