> 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]

Reply via email to