[luatex] slower texlua at LuaTeX 1.0.4 (TL 2017) ?
dirk.laurie at gmail.com
Sun Jun 4 13:26:31 CEST 2017
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
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