in reply to Performance improvement in perl scripts

Profile, then optimize. Devel::NYTProf is sort of the big guy on the block for profiling in Perl.

Once you've identified the problem areas, that's where the real programming begins. Remember:

If your code is too slow, you must make it faster. If no better algorithm is available, you must trim cycles.

-- Tom "Duff's Device" Duff


Dave

  • Comment on Re: Performance improvement in perl scripts

Replies are listed 'Best First'.
Re^2: Performance improvement in perl scripts
by JavaFan (Canon) on Apr 26, 2012 at 10:28 UTC
    You're not following the advice you're quoting!

    Tom starts off with If your code is too slow. This part is the most significant.

    If your code isn't too slow, there's no need to profile or optimize.