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

LibRegex: Replace the checkpoint backing store with a Vector

This makes repeated lookups and insertions much faster, yielding a
general performance improvement of about 10% in the regex test suite.
This commit is contained in:
Ali Mohammad Pur 2023-07-14 09:18:32 +03:30 committed by Andreas Kling
parent 2d6f50932b
commit 4bff4219ff
2 changed files with 8 additions and 4 deletions

View file

@ -647,7 +647,7 @@ struct MatchInput {
mutable Vector<size_t> saved_positions;
mutable Vector<size_t> saved_code_unit_positions;
mutable Vector<size_t> saved_forks_since_last_save;
mutable HashMap<u64, u64> checkpoints;
mutable Vector<u64, 64> checkpoints;
mutable Optional<size_t> fork_to_replace;
};