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

Use Reflection.Emit to generate IPerformanceCounterSet implementation #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MaxShoshin
Copy link

Improve performance and avoid memory allocation on accessing IPerformanceCounter.

Now:

Method Mean Error StdDev Gen 0/1k Op Gen 1/1k Op Gen 2/1k Op Allocated Memory/Op
IncrementPerformanceCounter 10.871 ns 0.2447 ns 0.4887 ns - - - -
IncrementPurelPerfCounter 8.135 ns 0.1556 ns 0.1455 ns - - - -
IncrementPreviousPerformanceCounter 102.371 ns 1.445 ns 4.873 ns - - - 106B

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.

1 participant