Closed
Description
#66095 is optimizing MemoryExtensions.StartsWith(span, "literal", OrdinalIgnoreCase) by auto-vectorizing cases where the literal string is all ASCII. In Regex, we can take advantage of this in the compiler and source generator by recognizing sequences of appropriate sets, e.g. "[Aa][Bb][Cc]"
, which our IgnoreCase option now produces (and will produce more robustly with #61048). Today we'll output individual checks for each set, e.g. (ch | 0x20) == 'a'
, but we can start outputting StartsWith calls with the corresponding multi-character literal string rather than performing individual comparisons against each char.