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
commit 4bff4219ff
Notes: sideshowbarker 2024-07-17 00:59:43 +09:00
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;
};