Addition: Initial Benchmarks for System.Reflection: Attributes#177
Merged
adamsitnik merged 3 commits intodotnet:masterfrom Dec 9, 2018
Merged
Addition: Initial Benchmarks for System.Reflection: Attributes#177adamsitnik merged 3 commits intodotnet:masterfrom
adamsitnik merged 3 commits intodotnet:masterfrom
Conversation
This benchmarks specifically GetCustomAttributes and IsDefined (used in dotnet/coreclr#20779 and dotnet/coreclr#20795) Note: there are many code paths through the attribute pipeline which vary drastically in terms of performance and allocations - so there's what seems to be an excessive number of benchmarks here, but they are all pretty unique.
adamsitnik
requested changes
Dec 9, 2018
Member
adamsitnik
left a comment
There was a problem hiding this comment.
@NickCraver big thanks for the PR! I am very happy to review the first benchmarks from our community!
Before I merge I would like to ask you for one thing:
could you please merge following partial classes:
src/benchmarks/micro/coreclr/System.Reflection/Attributes/AttributeTests.cs
src/benchmarks/micro/coreclr/System.Reflection/Attributes/GetCustomAttributes.cs
src/benchmarks/micro/coreclr/System.Reflection/Attributes/IsDefined.cs
into one:
src/benchmarks/micro/coreclr/System.Reflection/Attributes.cs
The namespace should be System.Reflection, the type name Attributes
once again big thanks for doing that!
src/benchmarks/micro/coreclr/System.Reflection/Attributes/AttributeTests.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/coreclr/System.Reflection/Attributes/AttributeTests.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/coreclr/System.Reflection/Attributes/GetCustomAttributes.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/coreclr/System.Reflection/Attributes/GetCustomAttributes.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/coreclr/System.Reflection/Attributes/IsDefined.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/coreclr/System.Reflection/Attributes/IsDefined.cs
Outdated
Show resolved
Hide resolved
PR feedback: don't follow the Math conventions here...go with what it should be :)
Member
Author
|
Absolutely (and with pleasure) - FWIW I was following the conventions of the Math tests there (which I thought odd). Changes are in :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This benchmarks specifically
GetCustomAttributes()andIsDefined()paths (used in dotnet/coreclr#20779 and dotnet/coreclr#20795)Note: there are many code paths through the attribute pipeline which vary drastically in terms of performance and allocations - so there's what seems to be an excessive number of benchmarks here, but they are all pretty unique.
Here's a sample run of the whole category on

netcoreapp2.1:The issue I can see here is naming. I tried to match conventions, but the descriptions are long because of the differentiation needed - is this okay? Suggestions for shortening them?