Skip to content

Enable SymbolicRegexNode.IsNullableFor fast path to inline - #61605

Merged
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:srmisnullable
Nov 15, 2021
Merged

Enable SymbolicRegexNode.IsNullableFor fast path to inline#61605
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:srmisnullable

Conversation

@stephentoub

Copy link
Copy Markdown
Member
MethodToolchainMeanErrorStdDevRatioRatioSDAllocated
IsMatch\main\corerun.exe10.639 ms0.0453 ms0.0402 ms1.000.00-
IsMatch\pr\corerun.exe9.190 ms0.1800 ms0.2143 ms0.870.02-
usingBenchmarkDotNet.Attributes;usingBenchmarkDotNet.Diagnosers;usingBenchmarkDotNet.Running;usingSystem.Linq;usingSystem.Text.RegularExpressions;[MemoryDiagnoser]publicpartialclassProgram{publicstaticvoidMain(string[]args){BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);}privateRegex_regex=newRegex("[a-q][^u-z]{13}x",RegexOptions.NonBacktracking);privatestring_input=string.Concat(Enumerable.Repeat("abcdefghijklz",100_000));[Benchmark]publicboolIsMatch()=>_regex.IsMatch(_input);}

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @eerhardt, @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

Issue Details
MethodToolchainMeanErrorStdDevRatioRatioSDAllocated
IsMatch\main\corerun.exe10.639 ms0.0453 ms0.0402 ms1.000.00-
IsMatch\pr\corerun.exe9.190 ms0.1800 ms0.2143 ms0.870.02-
usingBenchmarkDotNet.Attributes;usingBenchmarkDotNet.Diagnosers;usingBenchmarkDotNet.Running;usingSystem.Linq;usingSystem.Text.RegularExpressions;[MemoryDiagnoser]publicpartialclassProgram{publicstaticvoidMain(string[]args){BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);}privateRegex_regex=newRegex("[a-q][^u-z]{13}x",RegexOptions.NonBacktracking);privatestring_input=string.Concat(Enumerable.Repeat("abcdefghijklz",100_000));[Benchmark]publicboolIsMatch()=>_regex.IsMatch(_input);}
Author:stephentoub
Assignees:-
Labels:

area-System.Text.RegularExpressions

Milestone:7.0.0

@joperezrjoperezr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks good to me.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@stephentoub@joperezr