-
-
Notifications
You must be signed in to change notification settings - Fork 27
Benchmarks
The following benchmarks show that DotNetGlob outperforms https://github.com/kthompson/glob/ when testing how fast it is as evaluating non-matching strings.
The following are the results from benchmarking the Glob.IsMatch()
method, against a number of generated non-matching strings. The results are summarised by Glob Pattern, Number of generated strings tested against the glob, and the version of the runtime (benchmarks are run accross a range of runtimes).
The percentages represent the proportion of time it takes for DotNet.Glob to return a result, compared to the time it takes for https://github.com/kthompson/glob/ as the comparison. Therefore on average, DotNet.Glob takes 15.17% of the time it takes glob to match unsuccesful strings to the pattern p?th/a[bcd]b[e-g].txt
. Other variations show DotNet.Glob also performs favourably:
Benchmark Non Matching Strings
Pattern / Runtime / Number Of Matches | DotNetGlob IsMatch (Scale) |
---|---|
p?th/a[bcd]b[e-g].txt | 15.17% |
Clr | 15.50% |
Clr | 15.50% |
1 | 12.00% |
10 | 13.00% |
100 | 18.00% |
500 | 17.00% |
1000 | 17.00% |
10000 | 16.00% |
Core | 14.83% |
Core | 14.83% |
1 | 9.00% |
10 | 17.00% |
100 | 15.00% |
500 | 16.00% |
1000 | 16.00% |
10000 | 16.00% |
p?th/a[bcd]b[e-g]a[1-4][!wxyz][!a-c][!1-3].txt | 14.00% |
Clr | 14.00% |
Clr 14.00% | |
1 | 8.00% |
10 | 18.00% |
100 | 16.00% |
500 | 14.00% |
1000 | 14.00% |
10000 | 14.00% |
Core | 14.00% |
Core | 14.00% |
1 | 19.00% |
10 | 10.00% |
100 | 14.00% |
500 | 14.00% |
1000 | 13.00% |
10000 | 14.00% |
p?th/a[e-g].txt | 20.00% |
Clr | 19.50% |
Clr | 19.50% |
1 | 12.00% |
10 | 29.00% |
100 | 19.00% |
500 | 18.00% |
1000 | 20.00% |
10000 | 19.00% |
Core | 20.50% |
Core | 20.50% |
1 | 36.00% |
10 | 15.00% |
100 | 18.00% |
500 | 18.00% |
1000 | 17.00% |
10000 | 19.00% |
Grand Total | 16.39% |
BenchmarkDotNet=v0.10.1, OS=Windows
Processor=?, ProcessorCount=8
Frequency=2992662 Hz, Resolution=334.1507 ns, Timer=TSC
dotnet cli version=1.0.0-preview2-003131
[Host] : .NET Core 4.6.24628.01, 64bit RyuJIT
Clr : Clr 4.0.30319.42000, 64bit RyuJIT-v4.6.1586.0
Core : .NET Core 4.6.24628.01, 64bit RyuJIT