Possible TROFF speedup

Guy Harris guy at sun.uucp
Sun Aug 25 16:04:24 AEST 1985


>      In n3.c of device independent TROFF, there is a CPP variable INCORE
> which if defined seems to turn on some I/O optimizations.  But I don't have
> the time to trace through the miserable and uncommented code in TROFF to
> figure out what is really going on.  But someone with more time might 
> find it useful to define INCORE, build TROFF, and see what happens.
> Maybe things will speed up.

If it's anything like the INCORE in the S3/S5 TROFF, it won't speed up.
INCORE is for large virtual-memory systems which aren't running UNIX.  They
do "malloc" instead of "sbrk", and use standard I/O instead of
"read"/"write".  This (especially "malloc") slows things down quite a bit.
I whipped up a VMUNIX option for TROFF once that was based on INCORE but 1)
supported compressed macro packages and 2) used "sbrk" and "read"/"write".
"time"ing that TROFF (NROFF, actually) vs. older ones and vs. 4.2BSD's NROFF
indicated that it was faster; however, the output was bursty, rather than
continuous as 4.2BSD's NROFF output was, so it seemed slower.  Go figure.

	Guy Harris



More information about the Comp.unix.wizards mailing list