Up Prev Next
From: "Dave Cleary" <cleary at uunet dot uu dot net>
Subject: Perl5 startup speed
Date: Mar 15 1996 11:37PM
We are trying to convert some of our old sybperl (4) cgi scripts
to use Perl5. The good news is that most scripts work without
modification (statements such as 'print "name@domain"' give an
error about the un-escaped '@', which I can fix easily enough).
The bad news is that the startup time for perl5 is significantly
longer than perl4! Since the scripts are running in response to a web
browser,adding 3-7 seconds to a 1 second script is quite noticable.
Using some 1 or 2 line scripts of basically print "$0 :" with
or without require/use, we get these times:
hello.4: 0s real 0.000s user 0.030s system
sybperl.4: 1s real 0.070s user 0.100s system 0%
hello.5: 0s real 0.030s user 0.030s system
sybperl.5: 2s real 1.170s user 0.260s system 50%
dblib.5: 1s real 0.240s user 0.090s system 0%
ctlib.5: 7s real 1.010s user 0.150s system 14%
Notice that the 2 line script:
print "$0 :"
takes 7 seconds to complete.