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: David Woolley
Subject: Re: LYNX-DEV floating-point (was: using a dos xt)
Date: Sat, 2 Aug 1997 11:06:49 +0100 (BST)

> 
> On Thu, 31 Jul 1997, 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;

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.

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):

HTFile.c:74:    float           quality;
HTFile.c:342:   float,          value)
HTFile.c:863:PUBLIC float HTFileValue ARGS1(
HTFile.c:1488:      float best = NO_VALUE_FOUND;        /* So far best is bad */
HTFile.c:1520:              float value = HTStackValue(rep, format_out,
HTFile.h:104:        float           quality));
HTFile.h:135:extern float HTFileValue PARAMS((
HTFormat.c:21:PUBLIC float HTMaxSecs = 1e10;            /* No effective limit */
HTFormat.c:22:PUBLIC float HTMaxLength = 1e10;  /* No effective limit */
HTFormat.c:90:  float,          quality,
HTFormat.c:91:  float,          secs,
HTFormat.c:92:  float,          secs_per_byte,
HTFormat.c:133: float,          quality,
HTFormat.c:134: float,          secs,
HTFormat.c:135: float,          secs_per_byte,
HTFormat.c:419:PUBLIC float HTStackValue ARGS4(
HTFormat.c:422: float,                  initial_value,
HTFormat.c:446:         float value = initial_value * pres->quality;
HTFormat.h:153:        float            quality;        /* Between 0 (bad) and 
1 (good) */
HTFormat.h:154:        float            secs;
HTFormat.h:155:        float            secs_per_byte;
HTFormat.h:195:        float            quality,
HTFormat.h:196:        float            secs,
HTFormat.h:197:        float            secs_per_byte,
HTFormat.h:220:        float           quality,
HTFormat.h:221:        float           secs,
HTFormat.h:222:        float           secs_per_byte,
HTFormat.h:263:extern float HTStackValue PARAMS((
HTFormat.h:266:        float                   initial_value,
HTRules.c:313:    float quality, secs, secs_per_byte;
HTStyle.h:65:        float   grey;
HTStyle.h:70:typedef float HTCoord;

And HTCoord:

HTStyle.h:61:typedef NXCoord HTCoord;
HTStyle.h:63:#define HTCoord NXCoord
HTStyle.h:70:typedef float HTCoord;
HTStyle.h:73:    HTCoord     left_indent;            /* @@@@ junk! etc etc*/
HTStyle.h:86:    HTCoord             position;       /* x coordinate for stop */
HTStyle.h:106:    HTCoord             fontSize;       /* The size of font, not 
independent */
HTStyle.h:114:    HTCoord             indent1st;      /* how far first line in 
paragraph is
HTStyle.h:116:    HTCoord             leftIndent;     /* how far second line is 
indented */
HTStyle.h:117:    HTCoord             rightIndent;    /* (Missing from NeXT 
version */
HTStyle.h:119:    HTCoord             lineHt;         /* line height */
HTStyle.h:120:    HTCoord             descentLine;    /* descender bottom from 
baseline */
HTStyle.h:125:    HTCoord             spaceBefore;    /* Omissions from 
NXTextStyle */
HTStyle.h:126:    HTCoord             spaceAfter;

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