Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top