summaryrefslogtreecommitdiff
path: root/src/regex_impl.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-03-11 20:52:56 +1100
committerMaxime Coste <mawww@kakoune.org>2024-03-11 20:52:56 +1100
commitf25b3c005e3ba1153f319a07effbec232e8c9eed (patch)
treefc76763efc07732ab0231569ac2aa8e898ccdd6b /src/regex_impl.hh
parent9cc2f47e31e2f0211573b079fe1a5b5a253bada2 (diff)
flatten ThreadedRegexVM::codepoint
Profiling shows that this does not always get the utf8::read_codepoint call inlined and that almost doubles the time spent in the function.
Diffstat (limited to 'src/regex_impl.hh')
-rw-r--r--src/regex_impl.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/regex_impl.hh b/src/regex_impl.hh
index 1e8296b5..43db9a02 100644
--- a/src/regex_impl.hh
+++ b/src/regex_impl.hh
@@ -618,6 +618,7 @@ private:
is_word(utf8::codepoint(pos, config.subject_end));
}
+ [[gnu::flatten]]
static Codepoint codepoint(Iterator& it, const ExecConfig& config)
{
if constexpr (forward)