in reply to Re^3: String manipulation
in thread String manipulation

Wow, now's one of those rare times when I wish I could double-vote on a node.

I'd say that optimization should be really, really rare. Correctness is *so* much more important that it really should get almost exclusive attention. If for example, you have a really horrifically borked query due to bad DB indexes, I'd suggest that you're facing brokenness not optimization at that point.

Think *very* carefully before trading simplicity for performance.

Replies are listed 'Best First'.
Re^5: String manipulation
by BrowserUk (Patriarch) on Aug 02, 2004 at 15:33 UTC

    The funny things is, 9 times out of ten, simplifying your code is the best step you can take to optimising it--especially in perl.

    Of course, simplicity doesn't stop at the boundaries of the code you write. It crosses deep into all those "handy" modules kicking around.

    Dumb interface designs; over-designed, overly layered hierarchies; over reliance upon favoured methodologies, techniques and tools all conribute to complexity, and that usually translates to poor performance.

    Abstraction is good; design is everything--but knowing when to stop abstracting & designing is just as important.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon