Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Sort on Number Embedded in String

by Dru (Hermit)
on Mar 22, 2005 at 19:51 UTC ( #441593=note: print w/replies, xml ) Need Help??

in reply to Re: Sort on Number Embedded in String
in thread Sort on Number Embedded in String

Thanks friedo (and everyone else). I find your solution the easiest to understand. I know you didn't recommend the Schwartzian Transform for this problem, but I must read up on it since I've never even heard of it. It appears to be popular amongst the monks :-).

This place is great, in less then 30 minutes, I received a half dozen replies.
  • Comment on Re^2: Sort on Number Embedded in String

Replies are listed 'Best First'.
Re^3: Sort on Number Embedded in String
by Mugatu (Monk) on Mar 22, 2005 at 21:09 UTC
    The ST is a neat trick, and fun to learn about. In some cases, it is a very good optimization. But you should pay attention to friedo's comments. Often times the naive sort is fast enough that the overhead of the ST is not worth it, and it will almost always be easier to read than an equivalent ST.

Log In?

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

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

    Results (241 votes). Check out past polls.