Most of that difference is file size: the 'without comments' file is 10k lines, the 'with comments' file 600, since I was going with files I could find quickly in the GalSim distro!  Sorry, should have said that.  

By the way, I realized after I posted that there's a slight chance the buffer test could undercount lines: it tests for the first character being # and for the pattern \n#, but if the buffer happened to break in the middle of a line where there was a random hash, it will mistakenly decrement the count.  So be aware of that if you're thinking of using it.