Hi @LSchwerdt, do you think that the partial-sort versions would be a lot of work? I have an application that uses partial sorting, so I would be interested in trying to write something for this. Alternatively (perhaps a naive question), do you think that sort! could be modified easily/efficiently to keep track of the indices? It seems that the main reason sortperm! is slower than sort! is because of the element access cost for the custom ordering)? An alternative could be to sort a tuple containing the value and original index, e.g., for initial data x = randn(n); ix = zeros(Int64, n), suppose we have y = [(x,i) for (i,x) in enumerate(x)], then we could sort!(x) and set @inbounds for (i,yy) in enumerate(y); ix[i] = yy.i; end, though it seems that accessing yy.i is slow, which is I guess what SimultaneousSortperm tries to avoid?