Mail Archives: djgpp/1997/01/27/10:27:05
On 26 Jan 1997 jz AT bcsupernet DOT com wrote:
> Each iteration of the loop is taking about a half a second. the entire
> program takes just under 6 minutes to run which is just silly. The same
> program with the %.6f's taken out takes 10 seconds.
I don't find this neither surprising nor silly. When you use a float
format, `fprintf' has a lot of FP computations to do, and they all are
emulated when you don't have a co-processor. The usual ratio of run
times between a machine with FPU and one without it, when they run an FP
program, is about 20-30. You see 6min / 10sec = 36, which is only
slightly higher (probably, due to the fact that you eliminate the %f
processing altogether rather than doing it with an FPU).
So I would say this is expected behavior.
- Raw text -