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 :^)
This commit is contained in:
Ali Mohammad Pur
2021-09-13 23:45:22 +04:30
committed by Ali Mohammad Pur
parent 7e75a16e6f
commit bf0315ff8f
Notes: sideshowbarker 2024-07-18 03:58:34 +09:00
3 changed files with 53 additions and 23 deletions

View File

@@ -12,7 +12,7 @@ namespace regex {
class Optimizer {
public:
static void append_alternation(ByteCode& target, ByteCode& left, ByteCode& right);
static void append_alternation(ByteCode& target, ByteCode&& left, ByteCode&& right);
};
}