summaryrefslogtreecommitdiff
path: root/src/string_utils.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-07-25 14:07:57 +1000
committerMaxime Coste <mawww@kakoune.org>2021-11-21 09:44:18 +1100
commit8566ae14a01a813a4b44846785675ae5d61b8eac (patch)
tree557d0bd49b2675db748fcfdcb204937817615dab /src/string_utils.cc
parent0e2612f1ad8634aa6b137a815459f69d0fd76941 (diff)
Reduce the amount of Regex VM Instruction code
Merge all lookarounds into the same instruction, merge splits, merge literal ignore case with literal... Besides reducing the amount of almost duplicated code, this improves performance by reducing pressure on the (often failing) branch target prediction for instruction dispatching by moving branches into the instruction code themselves where they are more likely to be well predicted.
Diffstat (limited to 'src/string_utils.cc')
-rw-r--r--src/string_utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_utils.cc b/src/string_utils.cc
index 459bea0b..a1c1c38d 100644
--- a/src/string_utils.cc
+++ b/src/string_utils.cc
@@ -31,7 +31,7 @@ String trim_indent(StringView str)
throw runtime_error("inconsistent indentation in the string");
return line.substr(indent.length());
- }), String{}, [](String& s, StringView l) -> decltype(auto) { return s += l; });
+ }), String{}, [](String s, StringView l) { return s += l; });
}
String escape(StringView str, StringView characters, char escape)