in reply to Re^2: Mysterious slow down with large data set
in thread Mysterious slow down with large data set
I tried it this way:
@topX = (-1) x 20; ... $topX[ $_ ] < $sim and splice( @topX, $_, 0, $sim ), pop( @top +X ), last for 0 .. 19;
A short-ciruited, linear insertion is at worst O(N) rather than O(N logN).
It speeds things a little, but doesn't address the slowdown which is happening exclusively (and inexplicably) inside PDL.
Unfortunately, the PDL documentation spends more time telling you about their 'philosophy'; and indexing the indexes to the documentation than is does telling you what these functions actually do; or how to inspect the results of what they did :(
|
|---|