feat: On SortVerbose#805
Conversation
|
Here are the benchmark results with
DetailsSpeedup of B over A (mean) = (mean time of A) / (mean time of B) A: B: Paired runs with n = 30 per benchmark with Environment:
|
|
Just in case, I also tried the first commit (refactoring only), but I got a compile error: |
The deeply-nested conditions on the length of the sizes is due to MesPrint truncating numbers which are too long for positioned fields, rather than loosening the positioning. snprintf doesn't truncate, so is much easier to align.
|
I fixed the non-compilation of the refactor commit. I also added a report of the total size of the generated terms, before sorting and compression. Pre-compression means that this number might be larger than |
Add information to the final sort summaries (per thread and master) including the number of comparisons made, the number of times the small and large buffers were sorted due to their capacities, and the total size of the unsorted, uncompressed generated terms.
|
I added information on the additional stats to the manual. |
The first commit just cleans up
WriteStatsby usingsnprintfto sort out the field alignment, rather than the deeply nested if statements andMesPrint.The second adds an
On SortVerbose;mode for the sort statistics printing, which looks like:The numbers are, across all threads,
TermsInSmallSmallSizeLargePatchesLargeSizeThe motivation is to make it easier for the user to configure sorting buffer sizes, since they are able to see what is the bottleneck. For example, increasing
SmallSizeis not useful ifTermsInSmallwas the reason for your small buffer sorts, etc. Printing the comparison count is more useful from a development perspective, if one is working on the sorting systems.I don't see any performance degradation due to collecting the extra information.
Any comments? Any extra useful information we could add here?