Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: DateTime.parse speed question
Berger, Daniel
2/14/2006 4:44:00 PM
> -----Original Message-----
> From: Charlie Bowman [mailto:cmbowma@castlebranch.com]
> Sent: Monday, February 13, 2006 11:15 AM
> To: ruby-talk ML
> Subject: DateTime.parse speed question
>
>
> I'm trying to speed up a small app that I've written. When I
> run the profiler I see that 46% of my applications time is
> spent on Integer#gcd. This seems to be coming from DateTime.
> I need to store dates, and then find the differences in time
> between these dates. Is there anything I can do differently
> or do I just have to suffer the consequences of using ruby's
> DateTime class?
>
>
> example
>
> diff = DateTime.now - data_from_file
> h,m,s,frac = DateTime.day_fraction_to_time(diff)
>
> another example
>
> todays_data << [DateTime.parse(time),status,task.chomp]
I know refactored versions for Integer#gcd have been proposed, although
I dunno if they've ever been accepted.
Try this one:
http://tinyurl...
Regards,
Dan
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: DateTime.parse speed question
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password