On 6/2/2017 2:33 PM, jfbu wrote:
my findings are ont reproduced on a Linux Box:
typically:
$ time /pathto/texlive/2016/bin/x86_64-linux/texlua collatz.lua 1 1000000
837799
real 0m23.755s
user 0m23.720s
sys 0m0.000s
and
$ time /pathto/texlive/2017/bin/x86_64-linux/texlua collatz.lua 1 1000000
837799
real 0m21.094s
user 0m21.080s
sys 0m0.000s
I don't have an independent Lua interpreter installed here.
And although timing varies up to 10%, it seems to the contrary the
TL2017 version is a bit faster here.
(TL2016 fully updated, TL2107 pretest fully updated)
I would be interested to here about other architectures.
Perhaps there is a special problem with x86_64-darwinlegacy ?
Should I move the thread to texlive ?
Some observations:
luatex mingw windows 64 bit : 14.1
texlua native windows 64 bit : 13.8 (tex live version)
lua native windows 64 bit : 13.6 (tex live version)
lua 5.1.4 : 29.4 (luaforwindows)
lua 5.1.5 : 38.3 (luaforwindows)
lua 5.2.4 bash on windows : 15.5
luatex bash on windows : 15.6
It probably all depends on optimization flags (and cpu cache and such)
... as I do quite some performance tests I'd immediately notice if there
was some mess up in the lua embedding in luatex (definitely if it were a
factor 2). I actualy expect lua 5.3 to be somewhat slower than 5.2.
Now, as you want speed (for that kind of times probably not a good idea
to do that runtime), you'd better optimize your lua code as without
knowing what this code does (so i can be wrong), i can gain 40% without
problem.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------