From 314ad44c57d364829415af41fa96712af35f62ea Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Fri, 11 Jan 2019 17:46:38 +0000 Subject: [PATCH] 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. --- 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 7d349c5b0e..1ce0fe1c6b 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 1b1248f248..e033471a16 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}