Uh oh!
There was an error while loading. Please reload this page.
Extend case optimization in MatchCharacterClass to all chars that differ by one bit - #63275
Conversation
ghost
commented
Jan 3, 2022
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions Issue DetailsIn RegexCompiler / source generator, we optimize matching a set like [Aa] to just do
|
Uh oh!
There was an error while loading. Please reload this page.
joperezr
left a comment
There was a problem hiding this comment.
LGTM. Can we add a couple of tests that use this which are not just casing?
stephentoub
commented
Jan 3, 2022
We have some (I know because I had a bug that caused a variety of tests to fail), but I can add some explicitly. |
ecb070d to
32ab180Compare32ab180 to
258bdadCompare
In RegexCompiler / source generator, we optimize matching a set like [Aa] to just do
(ch | 0x20) == 'a'. But we can trivially extend this to any pair of characters that differ by only a single bit and not just to casing.