[comp.arch] troff floating point

lindsay@MATHOM.GANDALF.CS.CMU.EDU (Donald Lindsay) (03/12/89)

In article <1143@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes:
>> Since troff is FP intensive (at least
>> on a VAX) that may be difference.
>
>How can it be FP-intensive if it has no floating point numbers in it?  I
>found no occurrences of "float" or "double" in the 4.3BSD "nroff"/"troff"
>source, and the SunOS 4.0 "nroff"/"troff" is basically derived from the
>4.3BSD version.

Possibly the confusion crept in because of the VAX 11/780 Floating
Point Accelerator.  When the FPA option is installed, the 11/780 will
do integer multiplies somewhat faster. Apparently, the integer multiply
can make use of the FPA's multiply hardware.

Of course, the number of integer multiplies in troff may depend on the
compiler which is used. On a VAX, some compilers generate scaled
addressing modes, where others would generate explicit multiplies.
Other VAX-independent optimizations ( strength reduction, loop
hoisting, multiply-by-constant, common subexpression elimination ) will
also reduce the number of multiplies, hence, reduce the impact of the
FPA.
-- 
Don		D.C.Lindsay 	Carnegie Mellon   Computer Science
--