I've just submitted pset5 (phew, finally, after a long battle). Anyway, the question here is I notice that when I add all comments to the codes I used, the running time of the speller increasing by heaps (from only 0.14 seconds with less comments to 4.03 seconds with full comments). I'm wondering why this happens? If we are going to be graded on our running time, can we submit the one without any comments at all? Thanks in advance.
The number of lines marked as comment does not affect the run time of your program. Submissions are graded by whether or not they pass all the tests, run time does not affect your final grade.
You can submit whichever version you'd like as long as it passes all the tests.
PS. I assume that by
when I add all comments to the codes I used, the running time of the speller increasing by heaps.
When I comment out the lines I have written, the running time of the program increases.
If that is wrong feel free to leave a comment explaining further what exactly it is you mean :)