Really depends on what you are commenting on. In addition to all the other answers, I have something that can really make a difference. From time to time, we programmers would have to comment on a block of code, for example:
<?php foreach ($results) { ?> <div> ... more divs ... </div> <?php } ?>
Suppose the length of $results is 20, and the length of the characters of each div is about 500 bytes (moderately dense div). Then we have 10 KB of HTML. In this case, the two comment methods will be very different:
<?php ?>
Zero bytes are sent to the visitor, and there is no PHP processing.
against
10 KB is still sent to the visitor, and PHP starts this loop with a huge y loop for nothing.
Of course, if you use a version control system (for example, git, svn), such comments (comments that cover the current code, not descriptions) should really be deleted at all.
Halil รzgรผr Nov 24 2018-11-11T00: 00Z
source share