Re: [PATCH] SLIST mergesort implementation

2013-11-25 Thread Theo de Raadt
> This is an implementation of the merge sort algorithm for SLIST in > queue(3). Sorting is something you do in an algorithm when you need it, specific to that algorithm, exactly where you need it. queue.h is supposed to be a minimal API, general access so that the specifics remain in the code us

Re: [PATCH] SLIST mergesort implementation

2013-11-25 Thread Philip Guenther
On Mon, Nov 25, 2013 at 5:51 PM, Rafael Zalamena wrote: > This is an implementation of the merge sort algorithm for SLIST in > queue(3). You gave a good description of _what_ your diff does, but not _why_ it should be done. The reaction of some developers is basically "WTFityFF?!?!" Off the top

[PATCH] SLIST mergesort implementation

2013-11-25 Thread Rafael Zalamena
This is an implementation of the merge sort algorithm for SLIST in queue(3). Merge sort is a stable algorithm that provides us a worst case run time of O(n lg n) and uses at most O(n) of stack (where 'n' is the current number of elements in the list). The patch attached to this mail provides the