[luatex] how many bytes for fontdimens?

Hans Hagen j.hagen at xs4all.nl
Thu Aug 5 11:25:13 CEST 2021


On 8/5/2021 10:01 AM, jfbu wrote:
> 
> 
>> Le 5 août 2021 à 09:50, jfbu <jfbu at free.fr <mailto:jfbu at free.fr>> a 
>> écrit :
>>
>> % pdftex
>> with (total): 5.34964pt
>> without (total): 5.45686pt
>> with minus without: -0.10722pt
>>
>> with (total): 5.55394pt
>> without (total): 5.61536pt
>> with minus without: -0.06142pt
>>
>> with (total): 5.35501pt
>> without (total): 5.3827pt
>> with minus without: -0.0277pt
>>
>> % luatex
>> with (total): 6.08586pt
>> without (total): 6.30107pt
>> with minus without: -0.21521pt
>>
>> with (total): 6.06969pt
>> without (total): 6.35312pt
>> with minus without: -0.28343pt
>>
>> with (total): 6.11238pt
>> without (total): 6.37778pt
>> with minus without: -0.2654pt
>>
> 
> I had accidentally TEXMFCNF set in my environment (from previous tests).
> 
> Testing some more with this environment variable of TeXLive unset, I
> get completely different results.
> 
> % pdftex
> with (total): 5.46095pt
> without (total): 5.43422pt
> with minus without: 0.02673pt
> 
> % luatex
> with (total): 6.10898pt
> without (total): 6.03908pt
> with minus without: 0.0699pt
> 
> 
> And re-setting it (to "$(pwd)") I reproduce again typically the above 
> results...
> 
> i.e. with TEXMFCNF set its is advantageous to use \romannumeral,
> both with pdftex and with luatex.
> 
> with TEXMFCNF not set, it is disadvantageous...
> 
> ... that’s highly baffling to me !
> 
> I repeated quite a few times to make sure timings are consistent,
> it seems with luatex it is, with pdftex less so
> 
> ok, I don’t want to induce people to lose time on ill-conceived test

one thinkg that you need to keep in mind is the size of the texmf tree

in context we don't use kpse so we don't suffer much from the size of 
the tree (it was actually oen of the first thing i did in mkiv/luatex, 
some 15 years ago: replace kpse with a lua variant)

when you use kpse (pdftex, luatex etc with latex) these lsr files are 
loaded and hashed, that takes time

then, when you add a local tree (e.g. home) that one gets scanned every run

so, in a tex live setup: the more files, the longer the start up time

a context installation (from the garden) is rather small compared to 
texlive, and an lmtx installation even smaller (most is documentation 
and fonts) .. over the year i've spend a lot of time making the user 
experience such that on the average a run is ok (on my 2013 laptop lmtx 
start up time is < .5 sec which includes dealing with all (some) 500 lua 
modules

i have no clue about latex overhead as i never run that (one of the 
persistent naratives is that latex is way faster than context but i'm 
not really sure about that)

most tex performance test are rubish ... one can test "test\par" or 
"test\page" a thousand times but what does it say ...

\starttext \testfeatureonce{1000}{test\par} \stoptext

system          > feature test done: 1000 steps, 0.090 seconds, 
0.000089939 per step
mkiv lua stats  > runtime: 0.542 seconds, 25 processed pages, 25 shipped 
pages, 46.125 pages/second


\starttext \testfeatureonce{10000}{test\par} \stoptext

system          > feature test done: 10000 steps, 0.907 seconds, 
0.000090726 per step
mkiv lua stats  > runtime: 1.370 seconds, 244 processed pages, 244 
shipped pages, 178.067 pages/second

\starttext \testfeatureonce{10000}{\null\page} \stoptext

system          > feature test done: 10000 steps, 12.509 seconds, 
0.001250932 per step
mkiv lua stats  > runtime: 13.487 seconds, 10000 processed pages, 10000 
shipped pages, 741.441 pages/second

\starttext \testfeatureonce{1000}{\samplefile{tufte}\page} \stoptext

system          > feature test done: 1000 steps, 4.290 seconds, 
0.004290208 per step
mkiv lua stats  > runtime: 4.815 seconds, 1000 processed pages, 1000 
shipped pages, 207.703 pages/second

now all this is not realistic: kick in some color, fonts, graphics, 
advanced structuring and in the end 20-30 pps is what one gets

(maybe on a modern machine twice that)

add some tikz and one can drink a coffee

in the end using an ssd, more memory (caching) had more impact than cpu 
bosts

(ok, i made the luametatex mem footprint much smaller than the luatex 
one but that's more for raspbery pi and such ... on that we run some 3 
times slower than on my intel laptop .. more a pet project)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list.