I have planned to improve the performances in my perl scripts.

Simple. Have them do less and they'll run faster.

I know that sounds cynical, but it isn't. It is a fact of record that when analysing bespoke business software for performance, anything from 40% to 80% of the cycles used by many of those applications, are spent doing non-business critical tasks.

The number 1 culprit is the production of elaborate, detailed and huge log and trace files. Files which cost the business in cpu cycles, storage space, backup and recovery processes and procedures, and which are frequently either: never accessed after they are produced; or only accessed in order to produce 'pretty picture' reports for MIS brochures of little or no value.

The number 2 culprit is the overuse of OO technologies -- intended to promote and simplify reuse -- for critical path elements of software systems that not only never have been reused, but on further analysis, never could be.

When analysing software for performance, look at each subsystem, step and line and determine if it actually contributes directly to the final result or outcome of the process. If not, ask the question: Why is it here? And if the answer starts with some variation of 'If ...'; consider it seriously for removal.

Once you're reduce the programs to doing only that which is actually necessary, then re-profile its runtime performance and only then decide if it is necessary to improve its performance further.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re: Performance improvement in perl scripts by BrowserUk
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.