-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollect_data.cpp
More file actions
35 lines (28 loc) · 773 Bytes
/
collect_data.cpp
File metadata and controls
35 lines (28 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#include "src/sorters_list.hpp"
#include "Benchmark.cpp"
#include <iostream>
int main() {
std::vector<Sorter<int>*> int_sorters = {
new InsertionSorter<int>,
new MergeSorter<int>,
new QuickSorter<int>,
new HeapSorter<int>,
new GQuickSorter<int>,
new SkipListSorter<int>
};
for (auto& it : int_sorters) {
Benchmark<int> bench(it);
bench.test();
}
std::vector<Sorter<std::string>*> string_sorters = {
new InsertionSorter<std::string>,
new InsertionBinSorter<std::string>
};
for (auto& it : string_sorters) {
Benchmark<std::string> bench(it);
bench.test();
}
return 0;
}