Re: Comments and performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux