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