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 :(


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?