From: Wouter Wijngaards Date: Tue, 3 Apr 2007 13:57:01 +0000 (+0000) Subject: much faster. X-Git-Tag: release-0.2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3749f1e1d978c1bea3ceb6128c4a8bc3cde4269d;p=thirdparty%2Funbound.git much faster. git-svn-id: file:///svn/unbound/trunk@226 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/testcode/unitlruhash.c b/testcode/unitlruhash.c index 532e912e8..699ef72e4 100644 --- a/testcode/unitlruhash.c +++ b/testcode/unitlruhash.c @@ -245,7 +245,7 @@ test_short_table(struct lruhash* table) } /** number of hash test max */ -#define HASHTESTMAX 100 +#define HASHTESTMAX 32 /** test adding a random element */ static void @@ -495,14 +495,14 @@ void lruhash_test() /* also small in size so that reclaim has to be done quickly. */ struct lruhash* table ; printf("lruhash test\n"); - table = lruhash_create(1024, 16384, + table = lruhash_create(2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_bin_find_entry(table); test_lru(table); test_short_table(table); test_long_table(table); lruhash_delete(table); - table = lruhash_create(1024, 16384, + table = lruhash_create(2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_threaded_table(table); lruhash_delete(table); diff --git a/testcode/unitslabhash.c b/testcode/unitslabhash.c index bd1472710..b3a0d7285 100644 --- a/testcode/unitslabhash.c +++ b/testcode/unitslabhash.c @@ -122,7 +122,7 @@ test_short_table(struct slabhash* table) } /** number of hash test max */ -#define HASHTESTMAX 100 +#define HASHTESTMAX 32 /** test adding a random element */ static void @@ -377,12 +377,12 @@ void slabhash_test() /* also small in size so that reclaim has to be done quickly. */ struct slabhash* table; printf("slabhash test\n"); - table = slabhash_create(4, 2, 16384, + table = slabhash_create(4, 2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_short_table(table); test_long_table(table); slabhash_delete(table); - table = slabhash_create(4, 2, 16384, + table = slabhash_create(4, 2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_threaded_table(table); slabhash_delete(table);