Do comments affect performance? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Do comments affect performance?

Is there any performance difference between code that has no comments and code that is littered with comments? (assuming that the same code was written in both instances)

1st May 2018, 6:16 PM
Oakley Walker
Oakley Walker - avatar
4 Answers
+ 2
As far as I'm aware, comments are ignored by the compiler. Only the coder sees them.
1st May 2018, 6:19 PM
Bagshot
Bagshot - avatar
+ 2
no.
1st May 2018, 6:29 PM
Leon Yang
Leon Yang - avatar
0
That was my assumption but I just wanted to verify, thanks!
1st May 2018, 6:26 PM
Oakley Walker
Oakley Walker - avatar
0
Maybe a tiny bit in JavaScript.
8th May 2018, 7:32 AM
grace
grace - avatar