I want some more clear information about the areas where we can apply optimization which will impact considerably in performances.
Eh, do you really expect useful answers? I can easily say that regular expressions with lots of backtracking are slow, and that there may be lots of improvement here, but that doesn't help you at all if you don't have any regular expressions, or if you are solving a problem that requires a lot of backtracking to begin with.

What you need to do is not only measure, but also to define goals. When is your program "good enough"? If you have a cron job that does a nightly job starting at 2 AM, and runs for an hour when noone is waiting for the results, there's unlikely to be a reason to optimize, even if you can bring the run time down to 1 minute.

OTOH, if you're selling on a website, and you notice that people surf away if rendering a page takes more than X seconds, saving off a few microseconds in a hot loop may have a noticeable effect in the number of sales you make. Or maybe not. You should measure to be sure.


In reply to Re: Performance improvement in perl scripts by JavaFan
in thread Performance improvement in perl scripts by balakrishnan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.