[Top][All Lists]

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

Re: [Groff] What does the "-u" in ".tmac-u" mean?

From: Ingo Schwarze
Subject: Re: [Groff] What does the "-u" in ".tmac-u" mean?
Date: Sun, 5 Nov 2017 15:45:17 +0100
User-agent: Mutt/1.8.0 (2017-02-23)


Werner LEMBERG wrote on Sun, Nov 05, 2017 at 08:04:46AM +0100:
> Branden wrote:

>> I move that we stop stripping the files.  Stripping them is saving
>> us only a few hundred kB out of 25 megs.

> It's not about saving disk space.

Actually, the tests on a large, real-world corpus of manual pages
containing a large fraction of mdoc(7) that i did two and a half
years ago seemed to indicate that the execution time benefit is
roughly consistent with what one would expect if it were mainly due
to the simple reduction of the macro file size:

In that sense, macro file size does seem to be the main effect,
and the savings in execution time seem to usually fall into the
range of 5-20% in cases that occur in practice.

> Remember that groff is an interpreted language *without* a
> translation to an internal representation.[*]  This means, for
> example, that a comment within a loop with 1000 repeats gets
> parsed a thousand times, again and again.
> Ditto for not stripped-off leading spaces.  Similarly, longer macro
> names take a longer time for being parsed.  This can make a
> significant difference even today for operations that should be as
> fast as possible.

Not sure i understand what you are saying:

 a) You mean that savings of 5-20% in execution time are "significant",
    even though formatting with mandoc would save about 60-90% of
    formatting time instead?

 b) Or do you mean that for a contrived test file calling mdoc(7)
    macros many times in a .while loop, with little or no text in
    the input file except that tight loop, savings are likely much
    larger?  AFAIK that was never tested, but how would it be

 c) Or do you mean that there are non-contrived, practically relevant
    cases where the savings are expected to be much larger?  I have
    no idea how those might look like, so i'm not sure how to do
    more meaningful testing.


reply via email to

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