A non-stable sort can be readily converted into a stable one, by
sorting/grading  x ;"_1 i.#x instead.  Similarly, a grade can be readily
used for sorting and vice versa.
http://code.jsoftware.com/wiki/Essays/Sorting_versus_Grading




On Fri, Oct 27, 2017 at 12:27 AM, Erling Hellenäs <[email protected]>
wrote:

> As we can see here, Quicksort is on average as fast as any other sort:
>
> https://en.wikipedia.org/wiki/Sorting_algorithm#Comparison_of_algorithms
>
> However, since it is not stable it is not useful in APL and J.
>
> A "stable" sort does not reorder items of equal value.
>
> /Erling
>
> Den 2017-10-26 kl. 22:42, skrev Raul Miller:
>
>> Here is a demonstration of a comparison of some relatively fast
>> sorting algorithms:
>>
>> https://i.imgur.com/rWFaMvP.gifv
>>
>> This is from https://imgur.com/gallery/voutF which is worth reading.
>> (Captions and descriptions are underneath the graphics they describe.)
>>
>> Some here might be interested...
>>
>> FYI,
>>
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to