[latex3-commits] [git/LaTeX3-latex3-latex3] master: Speed up \ior_map_inline:Nn, etc. (314ad44)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jan 11 18:46:38 CET 2019


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

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

commit 314ad44c57d364829415af41fa96712af35f62ea
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jan 11 17:46:38 2019 +0000

    Speed up \ior_map_inline:Nn, etc.
    
    This makes a real difference to load time with Unicode
    engines: they map over all of the Unicode data.


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

314ad44c57d364829415af41fa96712af35f62ea
 l3kernel/CHANGELOG.md |    4 ++++
 l3kernel/l3file.dtx   |   13 ++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 7d349c5..1ce0fe1 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Changed
+
+- Improved performance of `\ior_map_inline:Nn` and related functions
+
 ### Fixed
 
 - Handling of accented characters under mixed case changing in 8-bit engines
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 1b1248f..e033471 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1002,11 +1002,14 @@
 \cs_new_protected:Npn \@@_map_inline_loop:NNN #1#2#3
   {
     #2 #3 \l_@@_internal_tl
-    \ior_if_eof:NF #3
-      {
-        \exp_args:No #1 \l_@@_internal_tl
-        \@@_map_inline_loop:NNN #1#2#3
-      }
+    \if_ior:w #3
+      \exp_after:wN \use_none:nn
+    \fi:
+      \use:n
+        {
+          \exp_args:No #1 \l_@@_internal_tl
+          \@@_map_inline_loop:NNN #1#2#3
+        }
   }
 %    \end{macrocode}
 % \end{macro}





More information about the latex3-commits mailing list