feat: use std::forward_list for results
This commit is contained in:
parent
510deb2d54
commit
ba460cc00a
8 changed files with 37 additions and 23 deletions
|
@ -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[]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue