[latex3-commits] [latex3/latex2e] gh1189: Extend subsection on performance (e76a2de6)
github at latex-project.org
github at latex-project.org
Wed Nov 29 16:02:25 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : gh1189
Link : https://github.com/latex3/latex2e/commit/e76a2de6d765f78d5f8be278d43bb64d9ada0b72
>---------------------------------------------------------------
commit e76a2de6d765f78d5f8be278d43bb64d9ada0b72
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Nov 29 15:02:25 2023 +0000
Extend subsection on performance
>---------------------------------------------------------------
e76a2de6d765f78d5f8be278d43bb64d9ada0b72
base/doc/usrguide.tex | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/base/doc/usrguide.tex b/base/doc/usrguide.tex
index b379e568..2e457752 100644
--- a/base/doc/usrguide.tex
+++ b/base/doc/usrguide.tex
@@ -775,11 +775,6 @@ available:
in the standard version.
\end{itemize}
-When expandable commands have only |(+)m|-type arguments, the internal
-structure created is as efficient as that provided by |\newcommand(*)|.
-As such, \cs{NewExpandableDocumentCommand} may be used to replace
-\cs{newcommand} without concerns about performance.
-
\subsection{Commands at the start of tabular cells}
Creating commands that are used at the start of tabular cells imposes
@@ -799,6 +794,18 @@ a & b & c \\
\end{tabular}
\end{verbatim}
+\subsection{Performance}
+
+For document commands where the argument specification is entirely
+comprised of |m| or |+m| entries (or is entirely empty), the internal structure
+created by \cs{NewDocumentCommand} is essentially as efficient
+as provided by |\newcommand(*)|. As such, document commands may replace
+constructs arising from \cs{newcommand}, etc., without a need to be concerned
+about performance. Note that \cs{newcommand(*)} produces expandable
+results, so the direct replacement is \cs{NewExpandableDocumentCommand};
+in most cases, however, it is better to use \cs{NewDocumentCommand} to
+give more robust structures.
+
\subsection{Details about argument delimiters}
In normal (non-expandable) commands, the delimited types look for the
More information about the latex3-commits
mailing list.