(darwin-legacy pretest) about 5% slow-down of \edef in etex
jfbu
jfbu at free.fr
Sat Mar 7 09:06:28 CET 2020
Hi
> Hello,
>
>>> Doing 10,000,000 times \edef\z{666} takes about 5% more time
>>> with the darwin-legacy pretest compared to TeXLive 2019
>>> if done with etex, but no noticeable difference with tex.
>> circa 1.6s (a bit more) with etex + 2019
>> circa 1.7s (a bit less) with etex + 2020
>
> The etex format runs on the pdftex engine, and
> pdftex (and also [e][u]ptex) of TeX Live 2020 compress formats by zlib.
> % This feature is requested by me, because preloading expl3
> % (since LaTeX 2020-02-02) increases filesize of format files.
Thanks, I did not know that.
It does not look as if this affects my tests. They all seem to indicate
as by-product of timing about 0.1s of loading time whether with
the etex of TL2019 or the one of TL2020-pretest on my system.
The rest of this message consists of copied-pasted console outputs.
Sorry if a bit long but I wanted to keep lines indicated the
used binary
For example with testfile test4.tex next, I obtain rather systematically:
(Typical console output follows. These tests were executed many times
and the results vary little, those reproduced here are typical.)
## Testing \edef\foo{666666666666666666}
----
first with TL2019
$ time pdftex test4
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdftex)
[...]
(./test4.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/xint/xintkernel.sty)
0.65047pt
)
No pages of output.
Transcript written on test4.log.
real 0m0.764s
user 0m0.749s
sys 0m0.012s
----
then with TL2020
$ time pdftex test4
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdftex)
[...]
(./test4.tex
(/usr/local/texlive/2020/texmf-dist/tex/generic/xint/xintkernel.sty)
0.69621pt
)
No pages of output.
Transcript written on test4.log.
real 0m0.819s
user 0m0.804s
sys 0m0.012s
----
The bulk of the time increase (see the 0.65047pt vs 0.69621pt lines) seems
to come from expanding macros and executing \edef only.
Here we have an effect of about 7%.
However, I have another test file which simply fills 1000 pages
with each one paragraph of 1000 ".<space>". Then, to my surprise
the TL2020 pretest pdftex binary seems systematically faster.
## Testing filling up pages with <dot><space>
----
TL2019
$ time pdftex test3
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdftex)
[....]
[996] [997] [998] [999] [1000]
3.72269pt
)</usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test3.pdf (1000 pages, 314263 bytes).
Transcript written on test3.log.
real 0m3.861s
user 0m3.812s
sys 0m0.046s
Batchmode variant
$ time pdftex -interaction batchmode test3
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdftex)
restricted \write18 enabled.
entering extended mode
real 0m3.637s
user 0m3.608s
sys 0m0.027s
----
TL2020
$ time pdftex test3
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdftex)
[...]
[996] [997] [998] [999] [1000]
3.6658pt
)</usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test3.pdf (1000 pages, 314263 bytes).
Transcript written on test3.log.
real 0m3.815s
user 0m3.772s
sys 0m0.041s
Batchmode variant
$ time pdftex -interaction batchmode test3
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdftex)
restricted \write18 enabled.
entering extended mode
real 0m3.584s
user 0m3.554s
sys 0m0.026s
----
For people interested here are files test4.tex and test3.tex
%%% test4
\input xintkernel.sty
\pdfresettimer
\xintReplicate{1000}{\xintReplicate{1000}{\edef\foo{666666666666666666}}}
\immediate\write128{\the\dimexpr\pdfelapsedtime sp\relax}
\bye
%%% test3
\input xintkernel.sty
\pdfresettimer
\xintReplicate{1000}{\xintReplicate{1000}{. }\par\vfill\eject}
\immediate\write128{\the\dimexpr\pdfelapsedtime sp\relax}
\bye
The \xintReplicate above is basically a clone of the expl3 one.
Thus test3 is faster with pretest but test4 is slower, compared to TL2019
Not only globally, but also with the \xintReplicate line separately timed
via \pdfresettimer/\pdfelapsedtime
Regards,
Jean-François
More information about the tex-live
mailing list.