in reply to Sorting a large data set

Another approach is to break the array into smaller chunks, sort each of the chunks. (I guess I'd use temporary disk files somehow, maybe using indexes to your original array?)

Then I'd interleave the sorted chunks into a final, sorted monolith. If a few hundred elements work fine during your testing, I'd probably crank it up to a thousand at a time .. you could even run some tests where you optimize, to see how fast you can get it to run.

Sounds like fun. :)

--t. alex

"Excellent. Release the hounds." -- Monty Burns.