PHP's time functions and this little library I put together a while back - 

http://imawebdesigner.com/utils/runtime_clock

--Toby

----- Original Message ----- 
From: "jeremy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 12:49 PM
Subject: RE: [PHP] Question concerning performance


> Now THAT's the kind of answer I was looking for. Thanks very much for
> checking that out.
> 
> Mind if I ask what you used for your benchmarking/timing software-wise?
> 
> blest,
> jeremy
> 
> 
> --
> Jeremy Kelley <[EMAIL PROTECTED]>          pgp keyid 0xAECBA355
> Phil 1:21                                      www.ganooz.com
> Car pour moi, la vie c'est le Christ, et la mort est un gain.
> 
> > -----Original Message-----
> > From: Toby Butzon [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 17, 2001 16:55
> > To: jeremy; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Question concerning performance
> >
> >
> > > Example ONE:  (in just parse mode)
> > > --------[cut]---------------
> > > <?
> > > print "<html-tag>blah blah blah blah blah blah blah</html-tag>";
> > > print "<html-tag>" . $Var1 . "</html-tag><b-tag>" . $Var2 .
> > "</b-tag>";
> > > ?>
> > > --------[/cut]--------------
> >
> > Ran a pretty rough benchmark: 10040 lines of code (5020
> > repetitions of the
> > above example) 10 times with an average execution time of
> > 6.07904628515244
> > seconds.
> >
> >
> > > Example TWO:  (in html && parse mode)
> > > --------[cut]---------------
> > > <html-tag>blah blah blah blah blah blah blah</html-tag>
> > > <html-tag><?=$Var1;?></html-tag><b-tag><?=$Var2;?></b-tag>
> > > --------[/cut]--------------
> >
> > Same benchmark, except these two lines were used instead of
> > the two lines
> > in the above case (obviously). Again, 10 executions; this
> > time the average
> > execution time was 6.40339350700379 seconds.
> >
> > There are 100 ways error could've been introduced into this
> > test; even so,
> > the results seem to lean towards not switching between html &
> > php modes...
> > although, you're talking about 1000 lines of code, and the
> > test used 10
> > times that, and the resulting difference was a little more
> > than 3 tenths of
> > a second... if you compared it with 1/10th of the code (your 1000 line
> > file), you'd probably have a difference in the hundredths-of-a-second
> > range.
> >
> > It's up to you, but I agree with what Christian said - I'd
> > probably shoot
> > for being able to maintain the code; with such a little speed
> > difference
> > you might as well set up more servers than optimize for 1/5th
> > of a second
> > in execution time.
> >
> > --Toby
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to