Date: Mon, 27 Jan 1997 17:11:41 +0200 (IST) From: Eli Zaretskii To: jz AT bcsupernet DOT com cc: djgpp AT delorie DOT com Subject: re:printf("%.6f") In-Reply-To: <5cgfka$pp0@clark.zippo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.