Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Choosing the right sort (Or: WUDsamatter?)

by hardburn (Abbot)
on Apr 14, 2005 at 13:28 UTC ( #447762=note: print w/replies, xml ) Need Help??

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.

  • Comment on Re: Choosing the right sort (Or: WUDsamatter?)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://447762]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2018-03-23 19:18 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (296 votes). Check out past polls.