Details
- Reviewers
elvisangelaccio - Group Reviewers
Dolphin
Diff Detail
- Repository
- R318 Dolphin
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Using the new benchmark, we can see some improvement, mostly in the single threaded case:
Custom mergeSort:
RESULT : DolphinSortingBenchmark::sortInt():
0.25 msecs per iteration (total: 64, iterations: 256)
PASS : DolphinSortingBenchmark::sortString(usr_bin)
RESULT : DolphinSortingBenchmark::sortString():"usr_bin":
2.4 msecs per iteration (total: 79, iterations: 32)
PASS : DolphinSortingBenchmark::sortString(citynames)
RESULT : DolphinSortingBenchmark::sortString():"citynames":
0.14 msecs per iteration (total: 72, iterations: 512)
PASS : DolphinSortingBenchmark::sortStringParallel(usr_bin)
RESULT : DolphinSortingBenchmark::sortStringParallel():"usr_bin":
0.63 msecs per iteration (total: 81, iterations: 128)
PASS : DolphinSortingBenchmark::sortStringParallel(citynames)
RESULT : DolphinSortingBenchmark::sortStringParallel():"citynames":
0.056 msecs per iteration (total: 58, iterations: 1024)
PASS : DolphinSortingBenchmark::cleanupTestCase()
Totals: 7 passed, 0 failed, 0 skipped, 0 blacklisted, 1610ms
std::stable_sort:
RESULT : DolphinSortingBenchmark::sortInt():
0.10 msecs per iteration (total: 54, iterations: 512)
PASS : DolphinSortingBenchmark::sortString(usr_bin)
RESULT : DolphinSortingBenchmark::sortString():"usr_bin":
2.3 msecs per iteration (total: 76, iterations: 32)
PASS : DolphinSortingBenchmark::sortString(citynames)
RESULT : DolphinSortingBenchmark::sortString():"citynames":
0.11 msecs per iteration (total: 57, iterations: 512)
PASS : DolphinSortingBenchmark::sortStringParallel(usr_bin)
RESULT : DolphinSortingBenchmark::sortStringParallel():"usr_bin":
0.61 msecs per iteration (total: 79, iterations: 128)
PASS : DolphinSortingBenchmark::sortStringParallel(citynames)
RESULT : DolphinSortingBenchmark::sortStringParallel():"citynames":
0.047 msecs per iteration (total: 97, iterations: 2048)
I expected that std::inplace_merge would be faster than the custom merge function, but that was not the case in the benchmark; it was actually quite a bit slower.
Seems sane to me and nice since it removes some code.
src/kitemviews/private/kfileitemmodelsortalgorithm.h | ||
---|---|---|
84 | Could you keep this function line at line 30 instead of moving, so that the diff actually shows what changed. |