Re: does //commenting reduce performance?

From: Date: Sun, 24 Nov 2002 13:43:44 +0000
Subject: Re: does //commenting reduce performance?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-125798@lists.php.net to get a copy of this message
Hello, "Ernest E Vogelsinger" <ernest@vogelsinger.at> wrote: > As PHP is an interpreter it needs to scan every line and every token of > code as it runs it. Thus said, of course using comments takes more time to > execute than having no comments. > > I have no profiling yet how much having comments or blank lines would > actually effect execution times, but I doubt it would be really an issue > since PHP, once a comment start is encountered, doesn't parse the text but > just scans for the end-comment tag. That said, it's reasonable to think that // // I // have // long // comments // that // extends // hundreds, // if not, // thousands // of lines. // Just kidding! :) // would be faster (unnoticeable it may be) than /* ------------------------------------------------------------- I have long comments that extends hundreds, if not, thousands of lines. Just kidding! :) ------------------------------------------------------------- */ Anyway, it's *always* better to have comments than nothing at all... - E

« previous php.general (#125798) next »