With a Perl based site, the pages come out significantly slower (ie: Databse intensive pages can take up to 10s) while a C based site usually displays the pages instantly.
Is it simply coz my Perl sucks or is there really such a big difference in speed between Perl and C?
Also, since I was testing the pages on my own personal computer which is more or less clutter free, wouldn't the results when tested on a shared webhost be very very much worse? I'm not very experienced with webhosts and stuff since the most I've had were free ones which didn't support CGI.. but now that I'm committed to making a CGI site, I'd like to check out whether webhosts in general (or westhost specifically) object to CGI programs that hog up CPU resources... and if they do, how do they define hogging?
René.
free ones which didn't support CGI
Also my host box is about 4 (on box stuff) to 60 (sockets/external stuff)
times faster than my test box, 133mhz/64meg/cable, at home.
GeorgeGG
edit:
I compile at home then upload to server.
...and so is Perl code. Perl is not interpreted but compiled each time before a script is run. That is why mod_perl will make such a difference because a given module will be compiled only once and then sit around as machine code waiting to do its job.
Andreas
then sit around as machine code waiting to do its job.
This is not 100% true. Perl code is compiled, but to a type of byte-code, in principle like java byte-code, which is then interpreted by the the perl interpreter. The byte-code is designed to be easy and fast to interpret, hence the speedup if you can skip the compilation phase.
René.