Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source context matching optimize #1442

Merged
merged 3 commits into from
Jul 25, 2020
Merged

Conversation

skomis-mm
Copy link
Contributor

What issue does this PR address?
Optimization made on source context matching (LevelOverrideMap, Match.FromSource()) for netstandard2.1.

Does this PR introduce a breaking change?
No

Please check if the PR fulfills these requirements

  • The commit follows our guidelines
  • Unit Tests for the changes have been added (for bug fixes / features)

Other information

Linux

BenchmarkDotNet=v0.12.0, OS=debian 11
Intel Core i7-3840QM CPU 2.80GHz (Ivy Bridge), 1 CPU, 4 logical and 2 physical cores
.NET Core SDK=3.1.201
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  Job-CSERBI : .NET Core 2.1.16 (CoreCLR 4.6.28516.03, CoreFX 4.6.28516.10), X64 RyuJIT
  Job-GDNCBZ : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
Method Runtime Mean Error StdDev Ratio
Filter_MatchingFromSource .NET Core 2.1 5,799.5 ns 51.17 ns 45.36 ns 1.00
Filter_MatchingFromSource .NET Core 3.1 3,564.5 ns 37.43 ns 35.01 ns 0.61
Logger_ForContext .NET Core 2.1 2,519.0 ns 15.37 ns 13.62 ns 1.00
Logger_ForContext .NET Core 3.1 961.8 ns 4.67 ns 4.36 ns 0.38
LevelOverrideMap_GetEffectiveLevel .NET Core 2.1 1,745.7 ns 11.95 ns 10.60 ns 1.00
LevelOverrideMap_GetEffectiveLevel .NET Core 3.1 193.8 ns 2.35 ns 2.20 ns 0.11

Windows

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.19041
Intel Core i7-3840QM CPU 2.80GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=3.1.300
  [Host]     : .NET Core 3.1.4 (CoreCLR 4.700.20.20201, CoreFX 4.700.20.22101), X64 RyuJIT
  Job-KEWXME : .NET Core 2.1.16 (CoreCLR 4.6.28516.03, CoreFX 4.6.28516.10), X64 RyuJIT
  Job-KKEVOV : .NET Core 3.1.4 (CoreCLR 4.700.20.20201, CoreFX 4.700.20.22101), X64 RyuJIT
Method Runtime Mean Error StdDev Ratio
Filter_MatchingFromSource .NET Core 2.1 8,088.7 ns 120.48 ns 112.70 ns 1.00
Filter_MatchingFromSource .NET Core 3.1 3,369.0 ns 71.49 ns 73.42 ns 0.42
Logger_ForContext .NET Core 2.1 6,322.1 ns 98.18 ns 91.84 ns 1.00
Logger_ForContext .NET Core 3.1 785.6 ns 9.05 ns 8.47 ns 0.12
LevelOverrideMap_GetEffectiveLevel .NET Core 2.1 5,619.1 ns 20.98 ns 18.60 ns 1.00
LevelOverrideMap_GetEffectiveLevel .NET Core 3.1 185.4 ns 1.63 ns 1.44 ns 0.03

Copy link
Member

@nblumhardt nblumhardt left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants