Thanks for the code. However, I found that maxk in Matlab is way faster(4.7 times in Matlab 2018a) than the maxk in Julia.
QQ=randn(1000,1);
tic;
for i=1:10000
[~,ind]=maxk(QQ,10);
end
toc;
and
tic();
for i=1:10000
ind1=maxk(Q,10);
end
toc();
Is it possible for the maxk in Julia to be as fast as that in Matlab?