[Dev-luatex] Benchmark.
David Kastrup
dak at gnu.org
Mon Apr 2 16:51:37 CEST 2007
Hi,
latex -ini latex.ltx gives
real 0m0.498s
user 0m0.080s
sys 0m0.408s
luatex -ini latex.8bit (where the latter just sets up the bytes->utf8
conversion through
\directlua0{
callback.register("process_input_buffer", function(buf)
return unicode.utf8.char(unicode.latin1.byte(buf,1,-1))
end)}
like in the last mail and then loads LaTeX) is
real 0m2.730s
user 0m1.836s
sys 0m0.700s
Sadly, I have no good way to see how much of this is caused by the
callback, and how much is due to other LuaTeX particularities.
However, one can run tex.tex through LuaTeX with and without this
translation, and just run the normal TeX engine, too.
tex tex.tex gives us
real 0m1.253s
user 0m0.496s
sys 0m0.664s
luatex tex.tex gives us
real 0m14.329s
user 0m13.413s
sys 0m0.872s
and using
time luatex "&plain" '\directlua0{callback.register("process_input_buffer",function(buf)return unicode.utf8.char(unicode.latin1.byte(buf,1,-1))end)}\input tex'
gives us
real 0m14.801s
user 0m12.709s
sys 0m1.304s
So the good news is that using the callback makes LuaTeX faster (more
probably the difference gets lost in the noise). And the bad news is
that it is about a factor of 25 slower than the normal TeX executable
in either case.
Some of it might be the difference in table sizes for the plain TeX
executable. But the factor of 25 seems to fit rather well also with
the LaTeX format test. Any idea where the bulk of this would be from?
What would somebody wanting to use LuaTeX in a production environment
do (apart from getting his head examined, I mean)?
--
David Kastrup
More information about the dev-luatex
mailing list