Given matrix A of size MxN, I would like to sort column-wise. In Matlab this can be solved easily and quickly by sort(A) and it can even sort row-wise by sort(A,2).
In fortran, I don't find this and thus far I just iteratively sort each column using dlsart2 but this is definitely much slower than MATLAB. I am sure someone must have run into this issue and I hope you can help me speed this up, perhaps along these lines:
1. Is there any column sorting subroutine that works faster then iterating dlsart2, which costs MN log M assuming that each iterate is M log M.
2. Is dlsart2 faster than any other sorting functions? Have anyone compare this it with dpsort.f90 of slatec or some sorting functions from orderpack? I found that dlsart2 is two times faster than qsortd.f90.
3. Is there anything else that is faster than dlsart2 that can beat MATLAB sort function?
John