Change a little bit the benchmarks to be more representative.

This commit is contained in:
Patrick Pelissier committed 2017-04-03 20:46:51 +02:00
1 parent 671c600b05
commit 54a3a4cd9c
6 files changed
+20 -11

No files matched your search

+3
View File
@@ -106,6 +106,7 @@ static void test_rbtree(size_t n)
*p = rand_get();
g_tree_insert(tree, p, NULL);
}
rand_init();
unsigned int s = 0;
for (size_t i = 0; i < n; i++) {
unsigned long key = rand_get();
@@ -143,6 +144,7 @@ test_dict(unsigned long n)
*value = rand_get();
g_hash_table_insert(dict, key, value );
}
rand_init();
unsigned int s = 0;
for (size_t i = 0; i < n; i++) {
unsigned long key = rand_get();
@@ -186,6 +188,7 @@ test_dict_big(unsigned long n)
sprintf(*value, "%u", rand_get());
g_hash_table_insert(dict, key, value );
}
rand_init();
unsigned int s = 0;
for (size_t i = 0; i < n; i++) {
char_array_t s1;