If your OS is up to snuff, any frequently accessed disk page is in memory already anyway. I don't think you should work harder, unless you're memory starved and its getting out of memory too often. But that didn't sound like your problem.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply. | [reply] |
You are making all sorts of speed assumtions. Cheifly your suppostion is that Perl is 'slow' because of the time taken to load the Perl binary into memory. You are completely off track in all liklihood. For a start it is probably cached on any decent OS. Disk I/O is the most common bottleneck. Crap algorithms rate pretty high as well. If it is a CGI mod_perl will probably be at least an order of magnutude faster, maybe more. If you have a specific problem you may find we can offer a specific answer. For example I cut a couple of orders of magnitude off a long running task here Re: Performance Question which was a pure disk I/O bottleneck.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
| [reply] |
The "slow" startup is related to the fact that perl has to compile your script into a parse tree or "bytecode" (Yes, fellow monks, I read the recent discussions about the B:: modules). If you are running on a command line, I don't think there's much you can do about it.
OTOH, if you are running in a web environment, mod_perl can greatly speed up the load time. If you are calling a perl script over and over, you could rethink the way you are doing things and make the perl program a continuous program, and feed the data in via named pipe or something.
Is there a specific problem you are running into?
| [reply] |
| [reply] |
| [reply] |
Uhm, what made you think that the "slowness" (is it?) of
Perl loading was IO bound?
Abigail | [reply] |