Question concerning performance

From: Date: Wed, 17 Jan 2001 10:37:05 +0000
Subject: Question concerning performance
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35015@lists.php.net to get a copy of this message
Greetings all. I've got a quick question, and please forgive me if this is off topic, but... I've got several applications that I'm trying to do some general tweaking on, and I've got a question, as well as a general purpose coding style for php. Is it faster to remain within _parsing mode_ while grinding through a script, or faster to drop in and out of parse vs html? I know this is kind of a mute point next to things such as database queries, etc. But, I'm just trying to make sure that if it can be improved, that I'm trying to do so. I'm sure my terms are incorrect, but, I think you all understand my question. I'll give some examples below. 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]-------------- 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]-------------- Now, let me elaborate. I'm quite aware that the above 2 code segments will both be fast enough for me not to care. BUT, within an application that has 1000 lines of code per page (hypothetically), everything begins to matter, and the more cpu-clicks I can save, the happier I'll be. The 2 examples will turn out the same results to the browser, but which will do it faster? Thanks for any comments/suggestions you can provide on this. jeremy -- Jeremy Kelley <jeremy@33ad.org> pgp keyid 0xAECBA355 Phil 1:21 www.ganooz.com Car pour moi, la vie c'est le Christ, et la mort est un gain.

« previous php.general (#35015) next »