mirror of
https://github.com/boostorg/sort.git
synced 2026-01-19 16:52:09 +00:00
Deleting generated code, adding excerpts to some examples, fixing a couple descriptions, and cleaning up some poor code style.
This commit is contained in:
@@ -94,20 +94,22 @@ int main(int argc, const char ** argv) {
|
||||
clock_t start, end;
|
||||
double elapsed;
|
||||
start = clock();
|
||||
if (stdSort)
|
||||
if (stdSort) {
|
||||
std::sort(array.begin(), array.end(), lessthan());
|
||||
else
|
||||
} else {
|
||||
//[stringsort_functors_call
|
||||
string_sort(array.begin(), array.end(), bracket(), getsize(), lessthan());
|
||||
//] [/stringsort_functors_call]
|
||||
}
|
||||
end = clock();
|
||||
elapsed = static_cast<double>(end - start);
|
||||
if (stdSort)
|
||||
if (stdSort) {
|
||||
outfile.open("standard_sort_out.txt", std::ios_base::out |
|
||||
std::ios_base::binary | std::ios_base::trunc);
|
||||
else
|
||||
} else {
|
||||
outfile.open("boost_sort_out.txt", std::ios_base::out |
|
||||
std::ios_base::binary | std::ios_base::trunc);
|
||||
}
|
||||
if (outfile.good()) {
|
||||
for (unsigned u = 0; u < array.size(); ++u)
|
||||
outfile << array[u].a << "\n";
|
||||
@@ -116,9 +118,10 @@ int main(int argc, const char ** argv) {
|
||||
total += elapsed;
|
||||
array.clear();
|
||||
}
|
||||
if (stdSort)
|
||||
if (stdSort) {
|
||||
printf("std::sort elapsed time %f\n", total / CLOCKS_PER_SEC);
|
||||
else
|
||||
} else {
|
||||
printf("spreadsort elapsed time %f\n", total / CLOCKS_PER_SEC);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user