[luatex] slower texlua at LuaTeX 1.0.4 (TL 2017) ?
mojca.miklavec.lists at gmail.com
Sun Jun 4 21:02:21 CEST 2017
On 3 June 2017 at 22:11, Patrick Gundlach wrote:
>> 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
> (similar with LuaLaTeX and LuajitLaTeX)
Thank you, so this confirms that it's only a problem of the
darwinlegacy version of the binary.
But Dick compiled luatex with the same compiler on the same OS version
last year, only using slightly different environmental variables (or
perhaps no variables at all; I was setting all the [OBJ]C[XX]FLAGS
with arch flags etc.).
Bonus question: what exactly is so special / what should be changed?
This calls for a bunch of further tests:
- just in case, testing i386-darwin and x86_64-darwin legacy from 2017
and universal-darwin from 2016 on the same machine (> 10.9) as the
tests done above
- compile LuaTeX from TL 2017 on 10.6 in various ways: with clang 4.0,
apple-gcc 4.2, gcc 4.7, gcc 7.1; with and without any flags; compare
- maybe try to compile lua alone with those same compiler first and
try to figure out if one can reproduce the problem with the bare lua
interpreter (this would simplify testing a lot)
... keeping in mind that we'll probably need a C++11-capable compiler
next year anyway, so any tests with gcc 4.2 will probably be
irrelevant next year anyway.
I'll try to compile with clang 4.0 first just to see what difference
that makes. But I suspect that setting C[XX]FLAGS explicitly most
likely replaces some optimisation flags somewhere.
I probably won't be able to do all that extensive analysis soon, so if
there are any volunteers interested in digging further, your help will
be greatly appreciated.
More information about the luatex