Port all benchs to new infrastructure

This commit is contained in:
Patrick Pelissier committed 2019-12-07 19:21:21 +01:00
1 parent 00111e3e3c
commit c60d59cb7a
12 files changed
+78 -96

No files matched your search

+15 -23
View File
@@ -238,30 +238,22 @@ static void test_stable_sort(size_t n)
/********************************************************************************************/
const config_func_t table[] = {
{ 10, "List", 10000000, 0, test_list, 0},
{ 20, "Array", 100000000, 0, test_array, 0},
{ 30, "Rbtree", 1000000, 0, test_rbtree, 0},
{ 40, "dict(m)", 1000000, 0, test_dict1, 0},
{ 41, "dictBig", 1000000, 0, test_dict_big, 0},
{ 42,"dict(u)", 1000000, 0, test_dict2, 0},
{ 43,"DictStr(u)", 1000000, 0, test_dict_str, 0},
{ 44,"DictStr(m)", 1000000, 0, test_dict_str2, 0},
{ 46, "dictLinear(u)", 1000000, 0, test_dict2_linear, 0},
{ 50, "Sort",10000000, 0, test_sort, 0},
{ 51, "Stable Sort",10000000, 0, test_stable_sort, 0}
};
int main(int argc, const char *argv[])
{
int n = (argc > 1) ? atoi(argv[1]) : 0;
if (n == 10)
test_function("List",10000000, test_list);
if (n == 20)
test_function("Array", 100000000, test_array);
if (n == 30)
test_function("Rbtree", 1000000, test_rbtree);
if (n == 40)
test_function("Dict(m)", 1000000, test_dict1);
if (n == 42)
test_function("Dict(u)", 1000000, test_dict2);
if (n == 46)
test_function("DictLinear(u)", 1000000, test_dict2_linear);
if (n == 41)
test_function("DictBig", 1000000, test_dict_big);
if (n == 43)
test_function("DictStr(u)", 1000000, test_dict_str);
if (n == 44)
test_function("DictStr(m)", 1000000, test_dict_str2);
if (n == 50)
test_function("Sort", 10000000, test_sort);
if (n == 51)
test_function("Stable Sort", 10000000, test_stable_sort);
test("STL", numberof(table), table, argc, argv);
exit(0);
}