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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:

> Am 05.04.2012 21:17, schrieb Junio C Hamano:
>> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]