diff options
| author | Martin Hořeňovský | 2026-08-24 15:11:44 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2026-08-24 15:11:48 +0200 |
| commit | fc5bc1fa8b57326b5bc8eaa189b3534b99913d07 (patch) | |
| tree | d50b26106d73ffab57ea88a3ef9a43823aee437d /tests/TestScripts/DiscoverTests | |
| parent | 499442d7ef9242ce1bb329d69ea13ee6d340421c (diff) | |
| download | catch3-fc5bc1fa8b57326b5bc8eaa189b3534b99913d07.tar.gz | |
Improve String matcher handling of case sensitivity
The old implementation of String matchers worked by making a, potentially
lower-cased, copy of both the constructor arg, and the arg to `match` calls.
The new implementation does not make copies, and instead does per-character
lowering if needed. This is a win in **most** cases, with two exceptions:
1) Case-insensitive `Equals` between long strings. The old implementation
is easy to autovectorize by the compiler, which wins over the extra copy
with sufficiently long inputs.
2) Case-insensitive `ContainsSubstring` with inputs that trigger the worst
case complexity of O(m*n) of the naive implementation.
The latter is fixable with some elbow grease by implementing a proper
string search algorithm, but the former is a cost we have to live with.
Diffstat (limited to 'tests/TestScripts/DiscoverTests')
0 files changed, 0 insertions, 0 deletions