mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
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:
committed by
Ali Mohammad Pur
parent
7e75a16e6f
commit
bf0315ff8f
Notes:
sideshowbarker
2024-07-18 03:58:34 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/bf0315ff8f7 Pull-request: https://github.com/SerenityOS/serenity/pull/10019
@@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user