Leon,
I just ran your timing script and came up with these times:

0.51340400 970691026

0.99698000 970691033

0.83268900 970691038


Much slower than yours.  Is your machine exceptionally fast, or is my
client's exceptionally slow?

Kathleen

::-----Original Message-----
::From: [EMAIL PROTECTED]
::[mailto:[EMAIL PROTECTED]]On Behalf Of Leon Atkinson
::Sent: Wednesday, October 04, 2000 3:28 PM
::To: FreeTrade
::Subject: RE: [FreeTrade] Question about parsing PHP code lines.
::
::
::> Which (if either) of the following 2 snips of code are more
::efficient and
::> faster to parse?
::>
::> Snip 1.
::>  print("</TD>\n");
::>  print("</TR>\n");
::>  print("</TABLE>\n");
::>
::> Snip 2.
::>  print("</TD></TR></TABLE>\n");
::
::#2 will be faster, but the difference is very, very small.  You
::should prove
::it to yourself by writing a small test script like this:
::
::<?
::      print(microtime() . "<br>");
::      for($i=0; $i<10000; $i++)
::      {
::              print("1");
::              print("2");
::              print("3<br>\n");
::      }
::      print(microtime() . "<br>");
::      for($i=0; $i<10000; $i++)
::      {
::              print("123<br>\n");
::      }
::      print(microtime() . "<br>");
::?>
::
::This gives me 0.88831700 970687237,  0.04122700 970687239, and 0.42651200
::970687240.
::So, the first version takes about 1.8 seconds.  The second takes about 1.4
::seconds.
::(Check my math :)
::That's 10,000 lines of HTML.  (Oh yeah...and I did this on a PHP 3 box).
::PHP 4
::should be even less of a difference.  It would be insteresting to see what
::performance
::you're getting on your box.
::
::Leon
::
::
::
::
::
::
::
::------------------------------------------------------------
::To subscribe:    [EMAIL PROTECTED]
::To unsubscribe:  [EMAIL PROTECTED]
::Site:            http://www.working-dogs.com/freetrade/
::Problems?:       [EMAIL PROTECTED]
::
::



------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Site:            http://www.working-dogs.com/freetrade/
Problems?:       [EMAIL PROTECTED]

Reply via email to