groupthm: speedup caching
replacing # in cached expressions only when necessary speeds up usage
This commit is contained in:
parent
0981e3f2d7
commit
7fe4092d8e
1 changed files with 22 additions and 11 deletions
|
@ -2616,7 +2616,7 @@
|
|||
% Cache this definition for re-runs of \LaTeX.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\@@_cache:n
|
||||
\@@_cache_slow:n
|
||||
{
|
||||
\csname @@_define_family_options:nnnn \endcsname { #1 } { #2 } { #3 } { #4 }
|
||||
}
|
||||
|
@ -2864,7 +2864,18 @@
|
|||
% for details.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_cache:n #1
|
||||
\cs_set_eq:NN \@@_cache:n \@@_cache_auxfile:n
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_cache_slow:n}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_cache_slow:n #1
|
||||
{
|
||||
\tl_set:Nn \l_tmpa_tl
|
||||
{
|
||||
|
@ -2889,7 +2900,7 @@
|
|||
\tl_use:N \g_@@_lazy_document_tl
|
||||
}
|
||||
{
|
||||
\cs_show:N \g_@@_lazy_auxfile_tl
|
||||
\exp_args:NNV \iow_now:Nn \l_my_iow \g_@@_lazy_auxfile_tl
|
||||
\benchmark_once:n
|
||||
{
|
||||
\tl_use:N \g_@@_lazy_auxfile_tl
|
||||
|
|
Loading…
Reference in a new issue