in reply to Compile Perl???

To me, the interesting thing about the lack of an optimizing Perl compiler is the reason why not: because Perl is so heavily based on self-evaluation, a compiler can do little more than embed the Perl interpreter and the code in the same executable.

In other words, you can't compile a Perl script to object code because Perl thinks in Perl, so you can't take the Perl out of the script.

From a design perspective, the only way to maintain the flexibility of Perl but maintain C speed is to:

  1. Profile your code to find out where the program is spending its time
  2. If appropriate, rewrite the sucker in C.

Generally this is unnecessary. Tools like FastCGI and mod_perl give us the ability to skip/reduce the parsing phase while keeping development fast.

stephen