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

Re: Re: Re: Sorting according to date

by hipe (Sexton)
on Jun 10, 2003 at 11:11 UTC ( [id://264627]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Sorting according to date
in thread Sorting according to date

I like your solution, it is elegant but a bit slower. Conversion of date strings to integers is expensive, but it pays off in the sorting faze. Dates that are close together have 4 to 6 equal characters from the beginning of the string, and the for loop is also faster than map. I made a couple of benchmarks to verify that. The difference in speed is not significant.
I had to assume some date format to be able to produce working solution. It is easy to modify for different format.

Replies are listed 'Best First'.
Sorting according to date
by campbell (Beadle) on Jun 12, 2003 at 15:33 UTC
    Thank you, O enlightened ones.

    Regards

    Campbell

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-25 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found