The file I am doing this on is roughly 25 000 characters (including newlines that I need). Is this the best way to do this?
Also, I do not need to edit the string.
Wow, there is actually a speed loss. The larger program I made was a solution to the USACO Calf Flac problem. The code is given below, as well as the times take for the different test cases.
Executing...
Test 1: TEST OK [0.000 secs, 3500 KB]
Test 2: TEST OK [0.000 secs, 3500 KB]
Test 3: TEST OK [0.000 secs, 3500 KB]
Test 4: TEST OK [0.000 secs, 3500 KB]
Test 5: TEST OK [0.000 secs, 3500 KB]
Test 6: TEST OK [0.000 secs, 3500 KB]
Test 7: TEST OK [0.000 secs, 3500 KB]
Test 8: TEST OK [0.162 secs, 3500 KB]
With line 34:
Executing...
Test 1: TEST OK [0.000 secs, 3636 KB]
Test 2: TEST OK [0.000 secs, 3636 KB]
Test 3: TEST OK [0.011 secs, 3636 KB]
Test 4: TEST OK [0.000 secs, 3636 KB]
Test 5: TEST OK [0.011 secs, 3636 KB]
Test 6: TEST OK [0.011 secs, 3636 KB]
Test 7: TEST OK [0.000 secs, 3636 KB]
Test 8: TEST OK [0.173 secs, 3636 KB]
No, it isn't. Those times are close enough to each other to be well within any margin of error in reporting (in fact it looks like the granularity of the clock is 11 milliseconds since all the times differ by exactly that much.)
So the change had no effect on your program, which one would expect given you don't use stdio at all.