Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: [ Natural Sort ]: Sorting a string with numbers

by hv (Prior)
on Aug 13, 2005 at 00:42 UTC ( [id://483474]=note: print w/replies, xml ) Need Help??


in reply to [ Natural Sort ]: Sorting a string with numbers

One small additional facet: because the (packed) index is appended to the key, this will gave you a stable sort even if the underlying sort is unstable.

See sort for more details about what that means, and when it might be relevant.

Hugo

  • Comment on Re: [ Natural Sort ]: Sorting a string with numbers

Replies are listed 'Best First'.
Re^2: [ Natural Sort ]: Sorting a string with numbers (stable?)
by tye (Sage) on Aug 13, 2005 at 01:06 UTC

    Usually... (as bart pointed out in fast, flexible, stable sort)

    If you have fewer than 16.7 million records and none of the records contain "\0" characters, then it always works, for example.

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://483474]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-18 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found