feat: use std::forward_list for results

This commit is contained in:
Michael Mandl 2024-03-20 13:25:28 +01:00
parent 510deb2d54
commit ba460cc00a
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
8 changed files with 37 additions and 23 deletions

View file

@ -35,7 +35,8 @@ void test_linear_finder(const vector<string> &word_list) {
find_timer.stop();
cout << "linear finder took " << find_timer << endl;
cout << "result list is " << result.size() << " element(s) long" << endl;
cout << "result list is " << std::distance(result.cbegin(), result.cend())
<< " element(s) long" << endl;
}
void test_parallel_finder(const vector<string> &word_list) {
@ -54,7 +55,8 @@ void test_parallel_finder(const vector<string> &word_list) {
find_timer.stop();
cout << "parallel finder took " << find_timer << endl;
cout << "result list is " << result.size() << " element(s) long" << endl;
cout << "result list is " << std::distance(result.cbegin(), result.cend())
<< " element(s) long" << endl;
}
int main(int argc, char *argv[]) {