[latex3-commits] [git/LaTeX3-latex3-latex3] master: Minor speed-ups in l3unicode by combining emptyness and comment-line checks (fcade7f)

Bruno Le Floch bruno at le-floch.fr
Sun Jan 13 23:33:32 CET 2019


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

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

commit fcade7f9fe367941b6139ec76764957901639b49
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Sun Jan 13 23:33:32 2019 +0100

    Minor speed-ups in l3unicode by combining emptyness and comment-line checks


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

fcade7f9fe367941b6139ec76764957901639b49
 l3kernel/l3unicode.dtx |   27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/l3kernel/l3unicode.dtx b/l3kernel/l3unicode.dtx
index ed5379a..be4477f 100644
--- a/l3kernel/l3unicode.dtx
+++ b/l3kernel/l3unicode.dtx
@@ -174,11 +174,8 @@
         }
       \ior_str_map_inline:Nn \g_@@_data_ior
         {
-          \cs_set_nopar:Npn \l_@@_tmpa_tl {#1}
-          \reverse_if:N \if_meaning:w \l_@@_tmpa_tl \c_empty_tl
-             \reverse_if:N \if:w \tl_head:n { #1 ? } \c_hash_str
-               \@@_data_auxi:w #1 \q_stop
-             \fi:
+          \reverse_if:N \if:w \c_hash_str \tl_head:w #1 \c_hash_str \q_stop
+            \@@_data_auxi:w #1 \q_stop
           \fi:
         }
       \ior_close:N \g_@@_data_ior
@@ -212,20 +209,16 @@
         }
       \ior_str_map_inline:Nn \g_@@_data_ior
         {
-          \tl_if_blank:nF {#1}
+          \str_if_eq:eeTF
+            { \tl_head:w #1 \c_hash_str \q_stop }
+            { \c_hash_str }
             {
-              \str_if_eq:eeTF { \tl_head:n {#1} } { \c_hash_str }
-                {
-                  \str_if_eq:eeT
-                    {#1}
-                    {
-                      \c_hash_str \c_space_tl
-                      \tl_to_str:n { Conditional~Mappings }
-                    }
-                    { \ior_map_break: }
-              }
-              { \@@_data_auxi:w #1 \q_stop }
+              \str_if_eq:eeT
+                {#1}
+                { \c_hash_str \c_space_tl Conditional~Mappings }
+                { \ior_map_break: }
             }
+            { \@@_data_auxi:w #1 \q_stop }
         }
       \ior_close:N \g_@@_data_ior
     \group_end:





More information about the latex3-commits mailing list