[thelist] Compile Perl

Keith Davis cache at dowebs.com
Thu Jun 7 12:12:38 CDT 2001

dwayne wrote:
> On Wednesday 06 June 2001 08:19, Keith Davis wrote:
> > http://www.indigostar.com/

> > applications. As server exes they are as fast as mod_perl but run only
> > on request. They are great for large app type server scripts that have

> increase. you're still loading the interpreter, and the efficiency of the
> script itself shouldn't be much greater unless they're doing some serious
> magic when it's compiled. i would have thought the only time saver on this
> would be the actual compilation time of the script, or am i missing something?

My comment "as fast as mod_perl" is a bit of "over exuberance". As you
can probably tell, I'm a big fan. I'm certainly not suggesting using an
exe to speed up a script as an alternative to mod_perl. That's not it's
purpose. Your point that the only savings is in compilation time indeed
applies to perlcc, but not quite to the perl2exe.

When I first looked at perl2exe I thought the same thing. I ran some
benchmark tests and was getting an average 60+% increase in execution
speed using mod_perl as the 100% mark, whereas perlcc was getting only

Add the size of any modules, stripped of comments, the size of your own
script, and the perl interpreter. You'd expect the compiled exe to be
that size. It's not, the exe is not the sum of it's parts, it's the
product of compilation & interpretation. I've compiled such exes that
are actually smaller than the interpreter. So the compilation process is
apparently producing the bare essentials, producing something similar in
composition to what mod_perl is holding in memory. And appearantly the
"interpreter" in the exe is not *the* perl interpreter since all it
needs at that point is the OS instruction set. That's why a perl2exe has
to be compiled for the OS that it will run on and a perlcc does not.
Invoking the exe therefore loads the same thing into memory that
mod_perl already has in memory, that being the difference in speed.


More information about the thelist mailing list