Question

Do Comments in code increase time complexity of a program.?

I have many running applications wherein there are codes which are commented within functions.

These commented codes are of 500 lines within a function and the actual code of just 10 lines. Will this affect the Time complexity ?

These comments will make the size of the application larger but will it affect the efficiency of application when the respective function with commented code will be called?

Était-ce utile?

La solution

Comments are typically removed before compilation, so they don't affect the code size. Secondly, time complexity refers to the asymptotic time taken for an algorithm, for example n^2 or log(n). See http://en.wikipedia.org/wiki/Big_O_notation.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top