Fix issue: do not compute the good result of the benchmark.
This commit is contained in:
1 parent
f091f6fe49
commit
d3669fab53
1 file changed
+2
-2
+2
-2
@@ -66,12 +66,12 @@ static int compare(gconstpointer a, gconstpointer b, gpointer user_data)
|
||||
|
||||
static void test_rbtree(size_t n)
|
||||
{
|
||||
GTree *tree = g_tree_new_full(compare, NULL, free, free);
|
||||
GTree *tree = g_tree_new_full(compare, NULL, free, NULL);
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
// NOTE: unsigned long are not designed to work with GPOINTER_TO_INT according to documentation.
|
||||
unsigned long *p = malloc(sizeof(unsigned long));
|
||||
*p = rand_get();
|
||||
g_tree_insert(tree, p, NULL);
|
||||
g_tree_insert(tree, p, p);
|
||||
}
|
||||
rand_init();
|
||||
unsigned int s = 0;
|
||||
|
||||
Reference in new issue
Block a user