Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/3] add mergesort() for linked lists

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:32

René Scharfe [off-list ref] writes:
Am 05.04.2012 21:17, schrieb Junio C Hamano:
quoted
After seeing "I wrote it myself due to NIH", it strikes me a bit odd that
you still used "start from bunch of singleton sublist, elongating twice
per round as we go" structure from the original.
It's just becasue the dumb bottom-up approach is the most simple way to
implement merge sort.
...
This optimization speeds up the pre-sorted case but slows down the case of
a reversed pre-sorted list because we have to determine the length of the
sublists each time,...
Ah, I somehow missed that point.  Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help