[Dev-luatex] Dump sharing - redundant copying/allocations

Michal Vlasák lahcim8 at gmail.com
Wed Jul 21 16:19:59 CEST 2021


On Wed Jul 21, 2021 at 3:13 PM CEST, Petr Olsak wrote:
> IMHO, the TeX engine can save a flag about Endianity to the format.
> When a TeX engine reads such a format then it can check the current
> Endianity with the saved one and do swapping only if they are
> different. But this idea was'nt implemented: all formats use non-Intel
> Endianity (by decision of develpers), so swapping are processed very
> often.

Hans was quicker with his reply, but here is how I would put it:

The byte swapping on Little Endian isn't mandatory. One can compile with
-DNO_DUMP_SHARE.

> Moreover, saving lua bytecode to the format does not support different
> architectures (It was mentioned in this thread too). IMHO, the
> classical message "I am stymied" should be sufficient when a TeX
> engine reads a format generated at different architecture.

This is exactly what I get when loading Big Endian format on Little
Endian:

    (Fatal format file error; I'm stymied)

The BE/LE check is actually done as a side effect of checking the magic
number (0x57325458, the first thing that gets checked).

Michal Vlasák


More information about the dev-luatex mailing list