[luatex] Identifying why LuaTeX 2023 is slower than LuaTeX 2022

Paulo Roberto Massa Cereda cereda.paulo at gmail.com
Mon Aug 28 16:49:37 CEST 2023


Dear friends,

I beseech your wisdom. :) In my tests, I noticed LuaTeX 2023 is
significantly slower than the 2022 counterpart. Here's a MWE:

--------8<--------
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui
officia deserunt mollit anim id est laborum.
\bye
--------8<--------

Benchmark 1: texlive/2022/bin/x86_64-linux/luatex test.tex
  Time (mean ± σ):     177.7 ms ±   1.4 ms    [User: 140.9 ms, System: 36.6 ms]
  Range (min … max):   175.8 ms … 180.3 ms    16 runs

Benchmark 2: texlive/2023/bin/x86_64-linux/luatex test.tex
  Time (mean ± σ):     286.7 ms ±   2.3 ms    [User: 246.1 ms, System: 40.3 ms]
  Range (min … max):   284.0 ms … 291.2 ms    10 runs

Summary
  texlive/2022/bin/x86_64-linux/luatex test.tex ran
    1.61 ± 0.02 times faster than texlive/2023/bin/x86_64-linux/luatex test.tex

I initially had tried with LuaLaTeX and got similar results. Ulrike
Fischer and Marcel Krüger kindly helped me find out what was going on,
but we could not find anything relevant. I've tried:

- loading a custom OTF font: 2022 was 1.53 ± 0.02 (cold cache) and
1.83 ± 0.03 (existing cache) times faster
- loading the default OTF font: 2022 was 1.68 ± 0.02 (cold cache) and
2.02 ± 0.03 (existing cache) times faster
- HarfBuzz: 2022 was 1.57 ± 0.02 times faster (cold cache) and 1.84 ±
0.05 times faster (existing cache)
- raw feature (normalize): 2022 was 1.81 ± 0.03 times faster
- updated luaotfload-tool in TL2022: 2022 was 1.83 ± 0.01 times faster
- no OTF: 2022 was 1.95 ± 0.02 times faster

I was wondering if someone could shed some light into this. :) Thanks!

Cheerio,

Paulo



More information about the luatex mailing list.