From 204057fdc5023b5f4ff55a69bc6593388ea427e7 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 13 Jun 2018 09:56:22 +0200 Subject: 2018-06-12 21:56:00 --- .../general/manuals/cld/cld-moreonfunctions.tex | 39 ++++++++++++---------- .../general/manuals/onandon/onandon-110.tex | 24 +++++++++++++ 2 files changed, 45 insertions(+), 18 deletions(-) (limited to 'doc/context/sources/general/manuals') diff --git a/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex b/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex index fab22515e..da3d6fe46 100644 --- a/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex +++ b/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex @@ -173,24 +173,27 @@ example of why coding in \TEX\ makes sense as it looks more intuitive: \test{test 4 \test{test 5} test 6} \stoptyping -There is also another mechanism available. In the next example the second -argument is actually a string. - -\starttyping -local nested = context.nested - -context.test("test 8",nested.test("test 9"),"test 10") -\stoptyping - -There is a pitfall here: a nested context command needs to be flushed explicitly, -so in the case of: - -\starttyping -context.nested.test("test 9") -\stoptyping - -a string is created but nothing ends up at the \TEX\ end. Flushing is up to you. -Beware: \type {nested} only works with the regular \CONTEXT\ catcode regime. +The \type {context.nested} variant is now an alias to \type {context.delayed} and +no longer builds a string representation. + +% There is also another mechanism available. In the next example the second +% argument is actually a string. +% +% \starttyping +% local nested = context.nested +% +% context.test("test 8",nested.test("test 9"),"test 10") +% \stoptyping +% +% There is a pitfall here: a nested context command needs to be flushed explicitly, +% so in the case of: +% +% \starttyping +% context.nested.test("test 9") +% \stoptyping +% +% a string is created but nothing ends up at the \TEX\ end. Flushing is up to you. +% Beware: \type {nested} only works with the regular \CONTEXT\ catcode regime. \stopsection diff --git a/doc/context/sources/general/manuals/onandon/onandon-110.tex b/doc/context/sources/general/manuals/onandon/onandon-110.tex index 78ec96588..e8b005f24 100644 --- a/doc/context/sources/general/manuals/onandon/onandon-110.tex +++ b/doc/context/sources/general/manuals/onandon/onandon-110.tex @@ -63,6 +63,30 @@ add up, but less that one thinks, especially when macros are already quite optimal. Also this runtime includes time normally used for running additional programs (e.g.\ for getting bibliographies right). +It must be said that performance is not completely under our control. For +instance, we have patched the \LUAJIT\ hash function because it favours \URL's +and therefore favours hashing the middle of the string which is bad for our use +as we are more interested in the (often unique) start of strings. We also +compress the format which speeds up loading but not on the native windows 64~bit +binary. At the time this writing the extra overhead is 2~seconds due to some +suboptimal gzip handling; the cross compiled 64~bit mingw binaries that I use +don't suffer from this. When I was testing the 32~bit binaries on the machine of +a colleague, I was surprised to measure the following differences on a complex +document with hundreds of \XML\ files, many images and a lot of manipulations. + +\starttabulate[||c|c|] +\NC \BC 1.08 with \LUA\ 5.2 \BC 1.09 with \LUA\ 5.3 \NC \NR +\BC \LUATEX \NC $21.5$ \NC $15.2$ \NC \NR +\BC \LUAJITTEX \NC $10.7$ \NC $10.3$ \NC \NR +\stoptabulate + +Now, these are just rough numbers but they demonstrate that the gap between +\LUATEX\ and \LUAJITTEX\ is becoming less which is good because at this moment it +looks like \LUAJIT\ will not catch up with \LUA\ 5.3 so at some point we might +drop it. It will be interesting to see what \LUA\ 5.4 will bring as it offers an +\ alternative garbage collector. And imagine that the regular \LUA\ virtual +machine gets more optimized. + You also have to take into account that having a browser open in the background of a \TEX\ run has way more impact than a few tenths of a second in \LUATEX\ performance. The same is true for memory usage: why bother about \LUATEX\ taking -- cgit v1.2.3