Date Manip Improvements

I

ikinal

I've profiled our input of large database files that are spending
large amounts of
time using Date::Manip
functions such as ParseDateString and UnixDate.
[using the NYTProfile, a very nice tool!!!]

While in some cases, the data is repetitive, so at first glance, I
thought
memiozation might help

BUT In many cases, the data is different [it might be the seconds
value that
advances, etc], so there's still a big hit...

Looking at the code, it's pretty complex, so converting it to C code
and inlining seems a stretch...

Does anyone have any suggestions?

Thanks,
Ihor Kinal
 
J

J. Gleixner

I've profiled our input of large database files that are spending
large amounts of
time using Date::Manip
functions such as ParseDateString and UnixDate.
[using the NYTProfile, a very nice tool!!!]

While in some cases, the data is repetitive, so at first glance, I
thought memiozation might help

BUT In many cases, the data is different [it might be the seconds
value that advances, etc], so there's still a big hit...

Looking at the code, it's pretty complex, so converting it to C code
and inlining seems a stretch...

Does anyone have any suggestions?


Look near the end of the documentation for 'SHOULD I USE DATE::MANIP'.
In short, there are other modules which might be faster.

If the manipulation is always doing the same thing, e.g. converting
201101022359 to 01/02/2011 23:59, then doing it yourself may be
faster than a generalized method that accepts many different formats.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top