Date Manip Improvements

Discussion in 'Perl Misc' started by ikinal@att.net, Sep 19, 2011.

  1. Guest

    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
     
    , Sep 19, 2011
    #1
    1. Advertising

  2. J. Gleixner Guest

    On 09/19/11 21:12, wrote:
    > 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.
     
    J. Gleixner, Sep 19, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. blupp
    Replies:
    0
    Views:
    1,039
    blupp
    Jan 15, 2004
  2. marcie
    Replies:
    0
    Views:
    613
    marcie
    Apr 28, 2004
  3. Louis Erickson
    Replies:
    2
    Views:
    238
    James Willmore
    Sep 3, 2003
  4. Arndt, Tobias

    ParseRecur from Date::Manip

    Arndt, Tobias, Nov 14, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    435
    Jacob Heider
    Nov 15, 2003
  5. Sandman

    Date::Manip using system libraries?

    Sandman, Feb 18, 2004, in forum: Perl Misc
    Replies:
    6
    Views:
    180
    gnari
    Feb 24, 2004
Loading...

Share This Page