we wasted several programmers years trying to do an in-house optimization as part of a code cleanup.

Seems to me, part of the problem is right there. If you're doing code clean-up, you're attempting to make your code more maintainable, readable, modularized etc. If you're doing optimization, you're attempting to make it more efficient. Doing both at the same time is inordinately difficult and makes failure at both more likely. I'd posit that even if you're a wizard who knows every nook and cranny of perl and can mentally juggle thousands of lines of code, you're probably better off doing clean-up and optimization in several alternating passes (I'm certainly no such wizard, so this is pure speculation on my part, but it makes sense).

This is also where I have most problems with the OP. While I agree that performance optimization is often important and probably does not get enough good press these days, I think it is dangerous to want to do too much of it too soon. It's hard enough coming up with a program design which is flexible yet simple. Strongly leaning towards optimization at the same time makes things infinitely harder and there aren't many people who can pull it off well. Also, I think it'll always be easier to refactor maintainable code for optimization than it will be to turn optimized but messy code into something another mortal can understand and maintain.


In reply to Re^4: Optimisation isn't a dirty word. by tirwhan
in thread Optimisation isn't a dirty word. by BrowserUk

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.