Begin object state calculation

This commit is contained in:
Vitaliy Filippov
2020-01-23 22:05:27 +03:00
parent a8bc44064d
commit d2a3f0c6dd
3 changed files with 244 additions and 28 deletions
+6 -2
View File
@@ -344,7 +344,11 @@ int main(int argc, char *argv[])
};
}
printf("Sorting\n");
// sort takes 7 s
std::sort(to_sort.begin(), to_sort.end());
// sorting the whole array takes 7 s
//std::sort(to_sort.begin(), to_sort.end());
// sorting in 3 parts... almost the same, 6 s
std::sort(to_sort.begin(), to_sort.begin() + to_sort.size()/3);
std::sort(to_sort.begin() + to_sort.size()/3, to_sort.begin() + to_sort.size()*2/3);
std::sort(to_sort.begin() + to_sort.size()*2/3, to_sort.end());
return 0;
}