R
rtillmore
I finished my program and ran some timing tests and found my program
is slower than the original. The original program just writes
everything to the screen and you have to use >output.txt to capture
the output. I decided to have the program write to the file
directly. So I added a fopen, changed the printf to fprintf(fptr, and
added fclose. When I ran my benchmarks my program ran 2 minutes
slower than the original program with the >output.txt
Is this normal? Is there something I can do to increate the speed of
fprintf? The program is basically a for do loop that calculates
values.
Thanks,
is slower than the original. The original program just writes
everything to the screen and you have to use >output.txt to capture
the output. I decided to have the program write to the file
directly. So I added a fopen, changed the printf to fprintf(fptr, and
added fclose. When I ran my benchmarks my program ran 2 minutes
slower than the original program with the >output.txt
Is this normal? Is there something I can do to increate the speed of
fprintf? The program is basically a for do loop that calculates
values.
Thanks,