1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:17:35 +00:00

LibRegex: Use a match table for character classes

Generate a sorted, compressed series of ranges in a match table for
character classes, and use a binary search to find the matches.
This is about a 3-4x speedup for character class match performance. :^)
This commit is contained in:
Ali Mohammad Pur 2021-10-03 19:01:25 +03:30 committed by Andreas Kling
parent 478b36c37b
commit 8f722302d9
6 changed files with 232 additions and 35 deletions

View file

@ -9,6 +9,8 @@
#include <AK/Types.h>
namespace regex {
struct CompareTypeAndValuePair;
enum class Error : u8;
class Lexer;
class PosixExtendedParser;