to the assumption that a “better algorithm” probably exists, and that a CPAN author probably found it.
Maybe. But do realize that something being on CPAN only means that a author found a algorithm. It may be correct, it may not be. It may be better, it may not be. The more times a wheel has been reinvented, the chance one of the authors has a better algorithm increases. It's also going to be harder to pick the better one (as there will be more choice).

Do also note that many CPAN authors try to be "complete", and engineer their provided solution to be as general as possible. That usually comes with a price. In fact, if performance really matters, not using CPAN is often the better solution: now you can create something that's tailor made for your environment, and you don't have to pay a price for being more general.


In reply to Re^2: 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.