mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
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.
This commit is contained in:
committed by
Ali Mohammad Pur
parent
f1851346d3
commit
253f4de302
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user