+ 2

Can comments slow down the compiler? And would the file size of my program increase if I use comments?

27th May 2017, 6:07 PM
Chinmaya
6 Respuestas
+ 12
no and no...
27th May 2017, 6:26 PM
Nikolay Nachev
Nikolay Nachev - avatar
+ 3
Comments are normally stripped out during preprocessing, so the compiler itself never sees them at all. They can (and normally do) slow compilation a little though--the preprocessor has to read through the entire comment to find its end (so subsequent code will be passed through to the compiler. Unless you include truly gargantuan comments (e.g., megabytes) the difference probably won't be very noticeable though.
27th May 2017, 6:45 PM
kanishka
kanishka - avatar
+ 1
Thanks for the quick answer! :D
27th May 2017, 6:27 PM
Chinmaya
0
Thanks a lot! :D
27th May 2017, 6:46 PM
Chinmaya
0
hi
30th May 2017, 6:58 PM
Arima Valan Immanuel
Arima Valan Immanuel - avatar
0
Comments are used to understand a program. It is meant for a user. Comments cannot slowdown your compiler because it doesn't see it at all when compiling
21st Jun 2017, 6:32 PM
Victory
Victory  - avatar