[latex3-commits] [git/LaTeX3-latex3-latex3] main: Update documentation of conditional optimization (fixes #1020) (#1021) (6925b36f6)
GitHub
noreply at github.com
Mon Nov 15 11:40:30 CET 2021
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/6925b36f61ada429353029ab59d043be885f708f
>---------------------------------------------------------------
commit 6925b36f61ada429353029ab59d043be885f708f
Author: Skillmon <Skillmon at users.noreply.github.com>
Date: Mon Nov 15 11:40:30 2021 +0100
Update documentation of conditional optimization (fixes #1020) (#1021)
>---------------------------------------------------------------
6925b36f61ada429353029ab59d043be885f708f
l3kernel/l3basics.dtx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index 5b810b393..39df859d6 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -2052,7 +2052,7 @@
% \@@_generate_T_form:wNNnnnnN,
% \@@_generate_F_form:wNNnnnnN
% }
-% \begin{macro}[EXP]{\@@_p_true:w}
+% \begin{macro}[EXP]{\@@_p_true:w, \@@_T_true:w, \@@_F_true:w, \@@_TF_true:w}
% How to generate the various forms. Those functions take the
% following arguments: 1: junk, 2: \cs{cs_set:Npn} or similar, 3: |p|
% (for protected conditionals) or |e|, 4: function name, 5: signature,
@@ -2066,11 +2066,11 @@
% expandable tests, we check for that by making sure that the second
% argument is empty. For \enquote{fast} conditionals, |#7| has an
% extra \cs[no-index]{if_\ldots{}}. To optimize a bit further we
-% could replace \cs{exp_after:wN} \cs{use_ii:nnn} and similar by a
-% single macro similar to \cs{@@_p_true:w}. The drawback is that if
-% the |T| or |F| arguments are actually missing, the recovery from
-% the runaway argument would not insert \cs{fi:} back, messing up
-% nesting of conditionals.
+% don't use \cs{exp_after:wN} \cs{use_ii:nnn} and similar but instead use
+% \cs{@@_TF_true:w} and similar to swap out the macro after \cs{fi:}. It would
+% be a tiny bit faster if we directly grabbed the |T| and |F| arguments there,
+% but if those are actually missing, the recovery from the runaway argument
+% would not insert \cs{fi:} back, messing up nesting of conditionals.
% \begin{macrocode}
\cs_set_protected:Npn \@@_generate_p_form:wNNnnnnN
#1 \s_@@_stop #2#3#4#5#6#7#8
More information about the latex3-commits
mailing list.