Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Compile Perl???

by stephen (Priest)
on Mar 06, 2000 at 03:16 UTC ( [id://4921]=note: print w/replies, xml ) Need Help??

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.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://4921]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-05-28 16:38 GMT
Find Nodes?
    Voting Booth?

    No recent polls found