On 6/23/07, howa <[EMAIL PROTECTED]> wrote:

Are there any method to compile the perl script for performance
increase,

Certainly, dozens. Fortunately for everyone involved, all of these
methods are applied automatically every time you run your program, so
every Perl program always runs at top speed.

sth similar to mod_perl?

but my script is run from command line...

You're probably noticing how mod_perl can keep a program running, so
that there's no start-up overhead for each new request. But something
that's run from the command line _is_ a new program, so it's going to
have _some_ start-up overhead. But since your actual /usr/bin/perl
binary is probably already loaded into memory for some other task on
your system, a Perl program's start-up overhead is typically less than
a custom binary's. (That's right; if you translated your Perl code to
C and compiled it, your start-up overhead would probably get worse.)

But before you start worrying about how bad start-up overhead is,
there are lots of other reasons that your program may seem slow;
fixing just one of them at random is like painting racing stripes onto
the shopping trolley in order to get the groceries faster.

Start by getting your program to work properly; don't optimize before
you know what you're doing. But when the program is done, just slow,
you need to profile it know where to start optimizing. Here's an
article to get you started:

   http://www.perl.com/pub/a/2004/06/25/profiling.html

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to