What I get from skimming this article, it's just obsessing around premature optimization and small techniques to shave off "hundreds of microseconds or even whole seconds" from the runtime of programs. It doesn't mention Benchmark.pm, it does mention the profiler only in passing, and it doesn't mention the fact that optimizing/changing your algorithm to a better suited algorithm will most likely give a much bigger gain than any string concatenation optimization. The author mentions "compiling to C" via the perlcc backend as a viable option without telling the limits of this process and what the magic "compile your Perl to C" bullet actually will accomplish.

The one article about hardcore optimization of Perl code is When Perl is not quite fast enough by Nicholas Clark, and the IBM article doesn't go that way.

I am not really fond of these drive-by article spammings by the IBM Developerworks, and I'd prefer if IBM Developerworks offered a subscriber method so that the folks interested in the articles can be notified without "Perl News" also being spammed by this.

Update: On second reading, the author mentions what perlcc does. I still wonder what the sense is, at it only reduces startup time, which is negligible for long-running processes.
Added link to Nicholas Clarks "When Perl is not quite fast enough" talk


In reply to Re: Optimize Perl by Corion
in thread Optimize Perl by Anonymous Monk

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.