lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV floating-point (was: using a dos xt)


From: Bela Lubkin
Subject: Re: LYNX-DEV floating-point (was: using a dos xt)
Date: Sun, 3 Aug 1997 23:02:36 +0000

I wrote:

> David Woolley wrote:
> 
> > > >  (Lynx makes heavy, unnecessary use of floating point).

> > HTStyle.h:70:typedef float HTCoord;

> I looked at every use of this and it seemed that replacing it with "int"
> would be safe.  So I tried it, and it compiled cleanly and did not
> change Lynx's output for any page that I tested it with (about 30 of the
> largest pages of SCO's HTML online documentation).  The resulting Lynx
> binary was also an average of 4% faster, over the same set.  My machine
> has hardware floating point.  I didn't go to the hassle of rebooting to
> test under emulation, but if it makes 4% difference with an integrated
> P5 FPU, it probably makes a *huge* difference with software FP.

I decided to try it after all.  Rebooted my machine with the floating
point hardware disabled, so that it would use software floating point.
I then tested

  time lynx -dump /usr/lib/scohelp/...whatever.html > /dev/null

for 35 of the largest HTML documents in SCO's online help.  I averaged
and normalized the results.

The four results:

  1. Lynx compiled with "typedef float HTCoord", run with hardware FPU:

       1.00   (average; time units normalized to this run)

  2. Lynx compiled with "typedef float HTCoord", run with software FPU:

       5.52

  3. Lynx compiled with "typedef int HTCoord", run with hardware FPU:

       0.97

  4. Lynx compiled with "typedef int HTCoord", run with software FPU:

       1.04

We can see that the major FP slowdown is due to HTCoord being a float.
Without attempting to change the other uses of floating point, this one
change made the software FPU performance 5.31 (5.52 / 1.04) times
faster.  It also made Lynx 3% faster even *with* hardware floating
point.

CPU: Intel Pentium MMX 166
Compiler: SCO OpenServer Release 5.0.4 USL cc -O

>Bela<
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]