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 20:46:30 +0000

David Woolley wrote:

> > >  (Lynx makes heavy, unnecessary use of floating point).
> > 
> > Where?
> 
> This is the primary offender; it's used all over GridText, to such an extent
> that it was above my threshold for attempting a quick fix (I need to 
> understand
> exactly how it is used before I can safely change it, even if the change
> proves trivial):
> 
> 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.

> There are lots more uses of float which could  have been done with scaled
> integers, but this one affects every thing that has to be placed on the
> screen.  And what's worse is that Lynx only deals in integral character
> positions, so gains no benefit from working in fractions.
> 
> My guesses are that CERN people were so used to doing numerical work that
> they forgot that most systems type programs don't need to use float at all.

Actually, it looks like they took that structure from something in the
NeXT OS, which probably used floating point for good reasons.

> Going to a machine with hardware floating point makes a remarkable difference
> to the speed at which Lynx runs!
> 
> Last reported (as an explicit report on this problem) over a year ago.
> 
> This is the complete grep from the WWW Library.  Some are only used on 
> a per document basis, but I can't exclude that others aren't used on a
> per tag or per anchor basis (I would want to check grey, at least):

"grey" appears precisely once, in the definition of typedef struct
_color; and that, only inside an "#ifdef NeXT_suppressed".

The other uses of float would require a bit more work to excise, and I
think they're less of a drag on performance.

>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]