ladybird/Userland/Libraries/LibRegex/RegexBytecodeStreamOptimizer.h
Ali Mohammad Pur bf0315ff8f LibRegex: Avoid excessive Vector copy when compiling regexps
Previously we would've copied the bytecode instead of moving the chunks
around, use the fancy new DisjointChunks<T> abstraction to make that
happen automagically.
This decreases vector copies and uses of memmove() by nearly 10x :^)
2021-09-14 21:33:15 +04:30

19 lines
292 B
C++

/*
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Forward.h"
namespace regex {
class Optimizer {
public:
static void append_alternation(ByteCode& target, ByteCode&& left, ByteCode&& right);
};
}