in reply to Re: How to make your Perl 30% faster
in thread How to make your Perl 30% faster

Many of the optimizations make it hard to debug the program. Most of us don't debug the perl binary, so that's a non-issue.

There are cases where optimization can break code. This is one good reason to have a good test suite. Usually it happens around particularly hairy code (IIRC, Duff's Device tends to trip up optimizers).

Also, higher optimization levels may start trading off time for space, which might make someone still running Perl on an old VAX angry.

In the general case of a regular Perl programmer, running on a reasonably up-to-date machine, higher optimization is fine.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^3: How to make your Perl 30% faster
by bluto (Curate) on Nov 16, 2004 at 18:43 UTC
    Usually it happens around particularly hairy code.

    Kind of like the C code that perl itself is written in? :-)

Re^3: How to make your Perl 30% faster
by PetaMem (Priest) on Nov 17, 2004 at 07:54 UTC

    Also, higher optimization levels may start trading off time for space, which might make someone still running Perl on an old VAX angry.

    Who is interested in an old VAX? ;-)

    But now that you mention it:
    -rwxr-xr-x    2 root root   11588 2004-11-17 09:49 /opt/perl-5.8.0_t/bin/perl
    -rwxr-xr-x    2 root root 1213952 2004-11-17 09:49 /usr/local/bin/perl
    
    Which looks really weird for me in the first case.

    Bye
     PetaMem
        All Perl:   MT, NLP, NLU