in reply to Compiled Perl
Yes, perlcc exists and can gain you some speed, but what it mainly is is a compiled dispatcher so that the byte-code doesn't have to be generated and parsed. The real work is still done by calling into the code for the perl operators.
Also notice that perl does quite a bit by evaluating code at runtime, so the interpreter is still needed even in compiled programs.
Still, it is true that initial perl load and code compile take a noticeable time if afterward very little running will be going on. This isn't a problem if a piece of code only runs once, but gets painful if it's run very often (e.g. typically seen in CGI). The generally used solution for this is in the perl world is persistent interpreters. For that, look at things like (for CGI) mod_perl, FastCGI and (generally useful) SpeedyCGI
When in your question you referred to apache holding the compiled code, you were probably talking about mod_perl. And since you wanted to apply that generally, SpeedyCGI is probably the answer you were looking for. Notice that there is no real need to have this kind of functionality builtin. These modules demonstrate that you can get the effect purely from what already exists.
|
|---|