Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Nov 2016 17:36:11 +0100
From:      Eduardo Morras <emorrasg@yahoo.es>
To:        freebsd-hackers@freebsd.org
Subject:   Re: qsort switching to insertsort
Message-ID:  <20161126173611.52a55651c31beedf51f8cf71@yahoo.es>
In-Reply-To: <CAOgwaMvUE%2BK==OE3zkpfpXa5kBC1YT4JAUVhujxEt9PcHXgqTw@mail.gmail.com>
References:  <ME1PR01MB0546A92343D712D8439B299C83880@ME1PR01MB0546.ausprd01.prod.outlook.com> <0bfb49b0-5d24-2766-6982-b4e49b0d5e81@selasky.org> <ME1PR01MB0546D041DC160763C5D3689883880@ME1PR01MB0546.ausprd01.prod.outlook.com> <CAOgwaMvUE%2BK==OE3zkpfpXa5kBC1YT4JAUVhujxEt9PcHXgqTw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 26 Nov 2016 06:35:53 -0800
Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> wrote:


> In quick sort , it is necessary to check worst case and switch to
> another sort method if it is detected .
> When this is not done , end result is stack overflow , etc . , but not
> success .
> Therefore , it is not possible to eliminate an alternative sort
> method .

And restricting the alternative sort for less than 40 elements (or other
number)? It's common implementation to fallback to other sort
algorithm, but doing so without restricting the number of elements can
cause on corner cases, sorting all elements with alternative sort,
which is bad.
 
> 
> Mehmet Erol Sanliturk

---   ---
Eduardo Morras <emorrasg@yahoo.es>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161126173611.52a55651c31beedf51f8cf71>