You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
+ /// ○ Match if at the beginning of the string.<br/>
/// ○ Match with 2 alternative expressions, atomically.<br/>
/// ○ Match a sequence of expressions.<br/>
- /// ○ Match if at the beginning of the string.<br/>
/// ○ Loop exactly 3 times.<br/>
/// ○ 1st capture group.<br/>
/// ○ 2nd capture group.<br/>
/// ○ Match a character in the set [0-5].<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// ○ Match a sequence of expressions.<br/>
- /// ○ Match if at the beginning of the string.<br/>
/// ○ Loop greedily any number of times.<br/>
/// ○ 4th capture group.<br/>
/// ○ 5th capture group.<br/>
int startingStackpos = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
+ // Match if at the beginning of the string.+ if (pos != 0)+ {+ UncaptureUntil(0);+ return false; // The input didn't match.+ }+
// Atomic group.
{
int atomic_stackpos = stackpos;
// Branch 0
{
- // Match if at the beginning of the string.- if (pos != 0)- {- goto AlternationBranch;- }-
// Loop exactly 3 times.
//{
startingStackpos = stackpos;
// Branch 1
{
- // Match if at the beginning of the string.- if (pos != 0)- {- UncaptureUntil(0);- return false; // The input didn't match.- }-
// Loop greedily any number of times.
//{
loop_iteration1 = 0;
Total bytes of base: 53924088
Total bytes of diff: 53916304
Total bytes of delta: -7784 (-0.01 % of base)
Total relative delta: 15.46
diff is an improvement.
relative diff is a regression.
conststringJsonPath="RegexResults-980.json";if(!File.Exists(JsonPath)){awaitusingvararchiveStream=awaitnewHttpClient().GetStreamAsync("https://mihubot.xyz/r/EorKPNpA");usingvararchive=newZipArchive(archiveStream,ZipArchiveMode.Read);archive.Entries.First(e =>e.Name=="Results.json").ExtractToFile(JsonPath);}usingFileStreamjsonFileStream=File.OpenRead(JsonPath);RegexEntry[]entries=JsonSerializer.Deserialize<RegexEntry[]>(jsonFileStream,newJsonSerializerOptions{IncludeFields=true})!;Console.WriteLine($"Working with {entries.Length} patterns");recordKnownPattern(stringPattern,RegexOptionsOptions,intCount);sealedclassRegexEntry{publicrequiredKnownPatternRegex{get;set;}publicrequiredstringMainSource{get;set;}publicrequiredstringPrSource{get;set;}publicstring?FullDiff{get;set;}publicstring?ShortDiff{get;set;}public(stringName,stringValues)[]?SearchValuesOfChar{get;set;}public(string[]Values,StringComparisonComparisonType)[]?SearchValuesOfString{get;set;}}
Job completed in 16 minutes 5 seconds (remote runner delay: 1 minute 38 seconds).
Using arguments:
regexdiff -NoPRLink
112 out of 18857 patterns have generated source code changes.
Examples of GeneratedRegex source diffs
"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25 ..." (1964 uses)
"^_(?=\\S)([\\s\\S]*?\\S)_(?!_)|^\\*(?=\\S)([ ..." (823 uses)
For more diff examples, see https://gist.github.com/MihuBot/6ea86eec172802ac7975b1b69c126a04
For a list of JIT diff regressions, see Regressions.md
For a list of JIT diff improvements, see Improvements.md
Sample source code for further analysis
Artifacts:
The text was updated successfully, but these errors were encountered: