Trevor Nichols wrote at Tue, 04 Jun 2002 15:52:38 +0200: > I've got two machines here which are pretty crappy but there seems to be something >seriously wrong > somewhere. One machine, a Pentium 200 MMX with 80MB ram runs a very simple script >taking 5 > seconds. > > t@data:~$ cat test.pl > use diagnostics; > use strict; > > print "hi\n"; > t@data:~$ time perl test.pl > hi > > real 0m5.105s > user 0m4.990s > sys 0m0.100s > > The same script without the use diagnostics and use strict provides a much faster >execution. > > ... > > I'm actually trying to setup a CGI script and it appears very slow. I tracked the >majority of the > speed problems to those two statements. Is this normal or do I need to run these >scripts on a > faster computer? I would think that should not be necessisary.
It's only the use diagnostics; call what makes it so slow. So if you want speed, remove diagnostics, but use strict; (I normally only say use diagnostics on, if I don't understand the error message.) Well, but 5 seconds is really slow. On my computer (1.1 GHz Pentium III) the difference is (user time) 0.010 s to 0.130 s. Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]