Skip to content

mergesort: improve tests and performance

René Scharfe git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9test-mergesort: use strbuf_getline()t/helper/test-mergesort.c+2 -42 replies
2/9test-mergesort: add sort subcommandt/helper/test-mergesort.c+8 -11 reply
3/9test-mergesort: add test subcommandt/helper/test-mergesort.c t/t0071-sort.sh+242 -111 replies
4/9test-mergesort: add generate subcommandt/helper/test-mergesort.c+59 -10 replies
5/9test-mergesort: add unriffle modet/helper/test-mergesort.c+29 -00 replies
6/9test-mergesort: add unriffle_skewed modet/helper/test-mergesort.c+28 -00 replies
7/9p0071: measure sorting of already sorted and reversed filest/perf/p0071-sort.sh+22 -70 replies
8/9p0071: test performance of llist_mergesort()t/perf/p0071-sort.sh+11 -00 replies
9/9mergesort: use ranks stackmergesort.c+66 -555 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] mergesort: improve tests and performance

Our mergesort for linked lists doesn't allocate temporary memory, which is nice. It is traversing the list multiple times from start to finish, though. This series teaches it to avoid that, which speeds it up considerably. But first it improves the associated test helper to exercise the code harder and to make the effect of the changes visible in terms of saved operations.

test-mergesort: use strbuf_getline()
test-mergesort: add sort subcommand
test-mergesort: add test subcommand
test-mergesort: add generate subcommand
test-mergesort: add unriffle mode
test-mergesort: add unriffle_skewed mode
p0071: measure sorting of already sorted and reversed files
p0071: test performance of llist_mergesort()
mergesort: use ranks stack

 mergesort.c               | 121 +++++++------
 t/helper/test-mergesort.c | 360 +++++++++++++++++++++++++++++++++++++-
 t/perf/p0071-sort.sh      |  40 ++++-
 t/t0071-sort.sh           |  11 ++
 4 files changed, 465 insertions(+), 67 deletions(-)
 create mode 100755 t/t0071-sort.sh

--
2.33.0