-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange benchmark results with std::string #4
Comments
I just investigated a bit and apparently when drop-merge-sort is benchmarked with So far it seems that the condition |
Ok, I eventually found the issue: when I uncomment the "sanity check" in the benchmarks, it throws an exception. The issue does come from } else {
*write = std::move(*read);
++read;
++write;
num_dropped_in_row = 0;
} Here } else {
if (read != write) {
*write = std::move(*read);
}
++read;
++write;
num_dropped_in_row = 0;
} For performance reasons, I don't think the algorithm needs to perform that check above for trivially copyable types. |
Thank you for investigating this! Just curious, which compiler/flag version triggered the exception? I'd experiment with it a bit myself. In the next weekend I'll test it out, rerun the benchmarks and submit the patch. |
I'm using MinGW-w64, either 32 or 64 bits. I otherwise still have issues (not with your code this time) with libc++ on OSX with other |
Alright. If I remember correctly, back then I tested it on Linux with g++ 5.4 and clang++ 3.8. Will try to repeat tests on Windows and on newer Linux VMs. |
Hi,
I recently tried to rerun the benchmarks to check another simpler Inv-adaptive algorithm against drop-merge-sort. I got expected results with
int
, but thestd::string
benchmark gives the following result:In the graph above,
pdq_sort
is an algorithm similar tostd::sort
,split_sort
is the algorithm I was working on anddrop_merge_sort
is similar to the implementation from this repository (I tried to use the implementation from here though, and it gave me similar results). The relative curves ofpdq_sort
andsplit_sort
, while not as pretty as the ones in your README, are rather expected. However I can't explain the one fordrop_merge_sort
. Do you have any idea what might be happening here, keeping in mind that the benchmark for integers has the expected results?EDIT: it says "sorting 10^6 int" but it's only because I forgot to change the graph title. It's effectively the results of the string benchmark.
The text was updated successfully, but these errors were encountered: