Will adding serious amounts of comments slow down the program? I mean like a novel length like the types of: war and peace. | Sololearn: Learn to code for FREE!

0

Will adding serious amounts of comments slow down the program? I mean like a novel length like the types of: war and peace.

9/18/2015 5:07:00 PM

Henrik Karlberg

3 Answers

New Answer

+6

From StackOverflow: 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.

0

no, comment will never slow down compilation

0