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

.NET object activation #1

Closed
MarkPflug opened this issue Aug 24, 2021 · 2 comments
Closed

.NET object activation #1

MarkPflug opened this issue Aug 24, 2021 · 2 comments

Comments

@MarkPflug
Copy link

Hi Joel.
I was reading through the .NET 6 performance blog that Stephen Toub published recently, and came across a section that reminded me of your object activation blog post. Apparently .NET 6 improves the performance of new T() for generic type activation. The relevant text is under the reflection section, search for "Activator.CreateInstance" to find the relevant paragraph. I thought it might be interesting to compare whether your cached-emit-activator approach is still a performance win in .NET 6, or if the simpler new T() approach is now on-par.

@joelverhagen
Copy link
Owner

Thanks for the heads up. I think I'll just update the top of the blog post with a note linking to Toub's blog post. I'm too lazy to rerun the results and update the whole post.

@MarkPflug
Copy link
Author

No worries. Just thought you might be interested, since you'd clearly spent some time researching this previously. Always nice when the idiomatic approach is also the fastest.

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

No branches or pull requests

2 participants