Could you provide any clue to guide me locate the issue? I'm willing to make a PR but I am unable to find the related issue.
On Tuesday, December 16, 2014 3:38:11 AM UTC+8, Stefan Karpinski wrote: > > There is not, but if I recall, there may be an open issue about this > functionality. > > On Sun, Dec 14, 2014 at 10:15 PM, Todd Leo <[email protected] > <javascript:>> wrote: > >> Is there a partial sort equivalent to sortperm! ? Supposingly selectperm! >> ? >> >> On Monday, December 8, 2014 8:21:33 PM UTC+8, Stefan Karpinski wrote: >>> >>> We have a select function as part of Base, which can do O(n) selection >>> of the top n: >>> >>> julia> v = randn(10^7); >>> >>> julia> let w = copy(v); @time sort!(w)[1:1000]; end; >>> elapsed time: 0.882989281 seconds (8168 bytes allocated) >>> >>> julia> let w = copy(v); @time select!(w,1:1000); end; >>> elapsed time: 0.054981192 seconds (8192 bytes allocated) >>> >>> >>> So for large arrays, this is substantially faster. >>> >>> On Mon, Dec 8, 2014 at 3:50 AM, Jeff Waller <[email protected]> wrote: >>> >>>> This can be done in O(N). Avoid sorting as it will be O(NlogN) >>>> >>>> Here's one of many Q on how http://stackoverflow.com/ >>>> questions/7272534/finding-the-first-n-largest-elements-in-an-array >>>> >>> >>> >
