[latex3-commits] [git/LaTeX3-latex3-latex3] master: Further performance work (f4d7fd0)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sat Jan 12 08:18:14 CET 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/f4d7fd0ffc0ebe851db0f1e01b369dd8f7ccd6b1
>---------------------------------------------------------------
commit f4d7fd0ffc0ebe851db0f1e01b369dd8f7ccd6b1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Jan 12 07:18:14 2019 +0000
Further performance work
>---------------------------------------------------------------
f4d7fd0ffc0ebe851db0f1e01b369dd8f7ccd6b1
l3kernel/l3unicode.dtx | 42 +++++++++++++-----------------------------
1 file changed, 13 insertions(+), 29 deletions(-)
diff --git a/l3kernel/l3unicode.dtx b/l3kernel/l3unicode.dtx
index e959a2a..a6f88d1 100644
--- a/l3kernel/l3unicode.dtx
+++ b/l3kernel/l3unicode.dtx
@@ -88,7 +88,7 @@
% \end{macrocode}
% A fast local implementation for generating characters.
% \begin{macrocode}
- \cs_set:Npx \@@_generate:nn #1#2
+ \cs_set:Npx \@@_generate:n #1
{
\sys_if_engine_luatex:TF
{
@@ -96,15 +96,15 @@
{
l3kernel.charcat
(
- \exp_not:N \int_eval:n {#1} ,
- \exp_not:N \int_eval:n {#2}
+ \exp_not:N \tex_number:D #1 ,
+ \exp_not:N \tex_the:D \tex_catcode:D #1
)
}
}
{
\exp_not:N \tex_Ucharcat:D
- \exp_not:N \int_eval:n {#1} ~
- \exp_not:N \int_eval:n {#2} ~
+ \exp_not:N \tex_number:D #1 ~
+ \exp_not:N \tex_the:D \tex_catcode:D #1 ~
}
}
% \end{macrocode}
@@ -126,10 +126,7 @@
\reverse_if:N \if_meaning:w \l_@@_tmpa_tl \l_@@_tmpb_tl
\tl_const:cx
{ c_@@_mixed_case_ \@@_generate:w "#1 _tl }
- {
- \@@_generate:nn { "#7 }
- { \char_value_catcode:n { "#7 } }
- }
+ { \@@_generate:n { "#7 } }
\fi:
\fi:
}
@@ -159,10 +156,7 @@
{
\tl_const:cx
{ c_@@_fold_case_ \@@_generate:w "#1 _tl }
- {
- \@@_generate:nn { "#3 }
- { \char_value_catcode:n { "#3 } }
- }
+ { \@@_generate:n { "#3 } }
}
}
{
@@ -174,15 +168,10 @@
{
\tl_const:cx { c_@@_fold_case_ \@@_generate:w "#1 _tl }
{
- \@@_generate:nn { "#2 }
- { \char_value_catcode:n { "#2 } }
- \@@_generate:nn { "#3 }
- { \char_value_catcode:n { "#3 } }
+ \@@_generate:n { "#2 }
+ \@@_generate:n { "#3 }
\tl_if_blank:nF {#4}
- {
- \@@_generate:nn { "#4 }
- { \char_value_catcode:n { "#4 } }
- }
+ { \@@_generate:n { "#4 } }
}
}
\ior_str_map_inline:Nn \g_@@_data_ior
@@ -216,15 +205,10 @@
{
\tl_const:cx { c_@@_ #2 _case_ \@@_generate:w "#1 _tl }
{
- \@@_generate:nn { "#3 }
- { \char_value_catcode:n { "#3 } }
- \@@_generate:nn { "#4 }
- { \char_value_catcode:n { "#4 } }
+ \@@_generate:n { "#3 }
+ \@@_generate:n { "#4 }
\tl_if_blank:nF {#5}
- {
- \@@_generate:nn { "#5 }
- { \char_value_catcode:n { "#5 } }
- }
+ { \@@_generate:n { "#5 } }
}
}
}
More information about the latex3-commits
mailing list