(j3.2006) an intrinsic for SORT()

Bill Long longb
Mon Feb 5 17:47:04 EST 2018


> On Feb 5, 2018, at 3:48 PM, Steve Lionel <steve at stevelionel.com> wrote:
> 
>  I could see the value in a proposal for a "quicksort" intrinsic that operated on intrinsic data types and rank-1 arrays only. 

Except that ?quicksort? is misnamed. OK, it?s better than Bubble sort.  But for sorting a long list of integers (representing, for example, genomic data), radix sort is often faster.  And it scales linearly both with the length of the list  and (inversely)  with the number of images.  At least in the versions I?m familiar with, the sorting part is mostly masked by the time it takes to read in the data.  You write the two operations intertwined to hide the cross-image  communication time. Or, alternatively, hide the READ time. 

We could easily add a crummy, non-performant quicksort and warn people it is only for convenience.  But that does not seem within our normal domain.  You can find a library routine that would do that. 

Cheers,
Bill

Bill Long                                                                       longb at cray.com
Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
Bioinformatics Software Development                      fax:  651-605-9143
Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425





More information about the J3 mailing list