You are here: Re: [PHP] Comments and performance « PHP « IT news, forums, messages
Re: [PHP] Comments and performance

Posted by Richard Lynch on 03/08/05 20:46

> Does this affect _execution performance_ of the scripts at all i.e. are
> they precompiled/interpreted and cached without comments or interpreted
> on every execution?

The comments get stripped out on each execution of the whole script,
unless you are using a caching system such as Zend Cache.

*HOWEVER*

I defy you to measure a statistically significant difference in script
execution speed for any reasonable amount of commenting.

PHP rips through the comments really fast, and then spends its time
"thinking" about the actual code.

Take your biggest script and do a benchmark with and without comments.

Quality commenting will never be out-classed by performance considerations.

Bad commenting is just Bad. :-)

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация