http://www.perlmonks.org?node_id=447762


in reply to Choosing the right sort (Or: WUDsamatter?)

Even though almost every sort routine I've ever written in Perl is an ST, I can't think of a single instance where it was done for speed. In fact, once the size of the list is significant, the ST starts eating gobs of memory. So a Out of Memory condition is likely where the ST is supposed to shine.

I wrote all this code as an ST to keep seperate things seperate. The sort routine should do sorting, not matching regexen, not calling databases, not arithmatic. Sorting. Preferably, it wouldn't even do an array dereferance and lookup, but then I would need a GRT, and the GRT requires the use of a string as an information-hiding mechanism, which I also don't like.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.