PDA

View Full Version : Dumb commenting question


CiaranM
03-13-2008, 01:31 AM
Here's my silly question for today. Does commenting-out large blocks of code impact performance whatsoever? I'm in Jscript, if that's important.
What about commenting blocks ( /*....*/ ) versus individual lines?
Is it good practice to keep comments to a minimum or to keep them together i.e. avoid having every other line commented? Does this add any overhead for the interpreter?

Cheers.

Ces
03-13-2008, 04:02 AM
A micro nano second perhaps? ;)

Edit:
Basically the interpreter compiles your script into "byte code" in the same way as a compiled language does so, except it does it on runtime.
It does check and eat up comments, which you shouldn't worry about. Commenting is good for you ;)

mantom
03-13-2008, 06:49 PM
Here's my silly question for today. Does commenting-out large blocks of code impact performance whatsoever? I'm in Jscript, if that's important.
What about commenting blocks ( /*....*/ ) versus individual lines?
Is it good practice to keep comments to a minimum or to keep them together i.e. avoid having every other line commented? Does this add any overhead for the interpreter?

Cheers.

Comments won't impact your performance. LogMessage(), using commands instead of the object model, and data type conversions are the real performance killers in scripting.

CiaranM
03-15-2008, 10:24 PM
I thought as much.
Thanks, folks.