[luatex] slower texlua at LuaTeX 1.0.4 (TL 2017) ?

Eduardo Ochs eduardoochs at gmail.com
Sun Jun 4 13:59:00 CEST 2017

One or two years ago I integrated Rob Hoelz's lua-repl


with lualatex. It was not trivial, but after doing that I could start
the REPL from any point in a .tex file just by putting a "\repl" at
the right place.

If there's interest I can try to pack and document what I did.

    Eduardo Ochs

On Sun, Jun 4, 2017 at 8:26 AM, Dirk Laurie <dirk.laurie at gmail.com> wrote:
> 2017-06-03 22:11 GMT+02:00 Patrick Gundlach <patrick at gundla.ch>:
>>> a sample lua script runs twice slower with texlua of TL2017
>>> than with the texlua from TL2016 and bare lua 5.3.3 I also
>>> have on my mac os x 10.9.5
>> I am not sure if this is still relevant (I haven't followed the whole discussion). Anyway: on my system (latest Mac Laptop with up to date software) I have the same results with tl2017 and tl2016 (minor differences of course):
>> $ time texlua collatz.lua
>> real    0m14.837s
>> user    0m14.552s
>> sys     0m0.106s
>> $ time texluajit collatz.lua
>> real    0m10.231s
>> user    0m10.205s
>> sys     0m0.012s
> I don't think it is a fair or even relevant test of texlua to use it on
> a CPU-intensive job involving no string processing whatsover,
> especially one that is easy and natural to do directly in C.
> texlua is not the reason why luatex exists, it is just a convenient
> add-on so that you do not need an independent Lua installation
> for the auxiliary scripts you may need to produce a beautiful
> document using TeX.
> In fact, texlua is not a separate program at all, it is luatex with
> certain options deduced from the name by which it is called.
> luatex called on a file with extension .lua does exactly the same
> job.
> Its main attraction over native Lua is that so many batteries are
> included — zip, gzip, mime, socket, unicode etc.
> Its main disadvantage is that it does not provide a Lua REPL.
> You must save your Lua code in a file. That must have been
> a design decision years ago. I wonder what the reasons were,
> and whether they are still as cogent now as then.

More information about the luatex mailing list