diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-11-03 10:40:39 +0330 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-11-17 20:13:04 +0330 |
commit | 253f4de30263d56a5af57954c1da922b61674cc1 (patch) | |
tree | 200b0c98d3c9838b5d5c34a27e338fd7823cb867 /Userland/Libraries/LibRegex/RegexByteCode.cpp | |
parent | f1851346d35c06e26667d9aa1ca95cfdd1ed71ba (diff) | |
download | serenity-253f4de30263d56a5af57954c1da922b61674cc1.zip |
LibRegex: Use spans<4> to avoid allocating small vectors
This path is hit a lot, and alloc/free of this vector was showing up on
profiles, so get rid of it.
Diffstat (limited to 'Userland/Libraries/LibRegex/RegexByteCode.cpp')
-rw-r--r-- | Userland/Libraries/LibRegex/RegexByteCode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibRegex/RegexByteCode.cpp b/Userland/Libraries/LibRegex/RegexByteCode.cpp index a3feeeae3b..39f292c9dd 100644 --- a/Userland/Libraries/LibRegex/RegexByteCode.cpp +++ b/Userland/Libraries/LibRegex/RegexByteCode.cpp @@ -546,7 +546,7 @@ ALWAYS_INLINE ExecutionResult OpCode_Compare::execute(MatchInput const& input, M return ExecutionResult::Failed_ExecuteLowPrioForks; auto count = m_bytecode->at(offset++); - auto range_data = m_bytecode->spans().slice(offset, count); + auto range_data = m_bytecode->template spans<4>().slice(offset, count); offset += count; auto ch = input.view.substring_view(state.string_position, 1)[0]; |