[latex3-commits] [git/LaTeX3-latex3-latex3] master: Further performance work (6282703)

Joseph Wright joseph.wright at morningstar2.co.uk
Sat Jan 12 11:19:14 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/628270368b11818d63a27a5ae67fd10db8443e25

>---------------------------------------------------------------

commit 628270368b11818d63a27a5ae67fd10db8443e25
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sat Jan 12 10:19:14 2019 +0000

    Further performance work


>---------------------------------------------------------------

628270368b11818d63a27a5ae67fd10db8443e25
 l3kernel/l3unicode.dtx |   48 +++++++++++++++++++++++++-----------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/l3kernel/l3unicode.dtx b/l3kernel/l3unicode.dtx
index a6f88d1..99d1be2 100644
--- a/l3kernel/l3unicode.dtx
+++ b/l3kernel/l3unicode.dtx
@@ -149,20 +149,18 @@
       \ior_open:Nn \g_@@_data_ior { CaseFolding.txt }
       \cs_set_protected:Npn \@@_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop
         {
-          \str_if_eq:nnTF {#2} { C }
-            {
-              \int_compare:nNnF
-                { \char_value_lccode:n {"#1} } = {"#3}
-                {
-                  \tl_const:cx
-                    { c_@@_fold_case_ \@@_generate:w "#1 _tl }
-                    { \@@_generate:n { "#3 } }
-                }
-            }
-            {
-              \str_if_eq:nnT {#2} { F }
-               { \@@_data_auxii:w #1 ~ #3 ~ \q_stop }
-            }
+          \if:w \tl_head:n { #2 ? } C
+            \reverse_if:N \if_int_compare:w
+              \char_value_lccode:n {"#1} = "#3 ~
+              \tl_const:cx
+                { c_@@_fold_case_ \@@_generate:w "#1 _tl }
+                { \@@_generate:n { "#3 } }
+            \fi:
+          \else:
+            \if:w \tl_head:n { #2 ? } F
+              \@@_data_auxii:w #1 ~ #3 ~ \q_stop
+            \fi:
+          \fi:
         }
       \cs_set_protected:Npn \@@_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop
         {
@@ -214,17 +212,21 @@
         }
       \ior_str_map_inline:Nn \g_@@_data_ior
         {
-          \tl_if_blank:nF {#1}
-            {
-              \str_if_eq:eeTF { \tl_head:n {#1} } { \c_hash_str }
+          \cs_set_nopar:Npn \l_@@_tmpa_tl {#1}
+          \reverse_if:N \if_meaning:w \l_@@_tmpa_tl \c_empty_tl
+            \if:w \tl_head:n { #1 ? } \c_hash_str
+              \cs_set_nopar:Npx \l_@@_tmpb_tl
                 {
-                  \str_if_eq:eeT
-                    {#1}
-                    { \c_hash_str \c_space_tl Conditional~Mappings }
-                    { \ior_map_break: }
+                  \c_hash_str \c_space_tl
+                  \tl_to_str:n { Conditional~Mappings }
                 }
-                { \@@_data_auxi:w #1 \q_stop }
-            }
+              \if_meaning:w \l_@@_tmpa_tl \l_@@_tmpb_tl
+                \exp_after:wN \exp_after:wN \exp_after:wN \ior_map_break:
+              \fi:
+            \else:
+              \@@_data_auxi:w #1 \q_stop
+            \fi:
+          \fi:
         }
       \ior_close:N \g_@@_data_ior
    \group_end:





More information about the latex3-commits mailing list