[latex3-commits] [latex3/latex3] main: Mention in the documentation that some conditionals are optimized (a12658b43)
github at latex-project.org
github at latex-project.org
Thu Jan 11 06:50:12 CET 2024
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/a12658b4312c5a061f7e9968b861fcb99bfa7959
>---------------------------------------------------------------
commit a12658b4312c5a061f7e9968b861fcb99bfa7959
Author: Bruno Le Floch <blflatex at gmail.com>
Date: Thu Jan 11 06:50:12 2024 +0100
Mention in the documentation that some conditionals are optimized
We did some work to optimize when a conditional code ends with
\prg_return_true: \else: \prg_return_false: \fi:, which is very
common, so let's advertise that.
>---------------------------------------------------------------
a12658b4312c5a061f7e9968b861fcb99bfa7959
l3kernel/l3prg.dtx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/l3kernel/l3prg.dtx b/l3kernel/l3prg.dtx
index 86c5bd813..8e7995a02 100644
--- a/l3kernel/l3prg.dtx
+++ b/l3kernel/l3prg.dtx
@@ -171,6 +171,10 @@
% state. There must be a return statement for each branch; failing to do
% so will result in erroneous output if that branch is executed.
%
+% The special case where the code of a conditional ends with
+% \cs{prg_return_true:} \cs{else:} \cs{prg_return_false:} \cs{fi:} is
+% optimized.
+%
% \begin{function}[updated = 2023-05-26]
% {
% \prg_new_eq_conditional:NNn,
More information about the latex3-commits
mailing list.