-
Notifications
You must be signed in to change notification settings - Fork 751
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
Improve performance of ActivatorUtilities.CreateInstance #693
Comments
@pakrym Here is a snapshot of the allocated memory when allocating 10000 objects with
But there is maybe a more generic but trickier optimization here. The method |
@Yves57 thank you for detailed analysis, I think you've done all the appropriate optimizations. We can keep the issue closed. |
@pakrym Do you think it makes sense to open an issue in CoreClr about the "lazy allocation" (last point of my previous comment)? |
@Yves57, yeah, do it. |
TIL that it's the person who merges the PR that gets credit for closing linked issues ;P. Sounds good, thanks for filing that issue @Yves57 ! |
Currently, it's 30x slower than invoking factory delegate.
While it could never reach the performance of invoking the factory delegate there is a lot of possible improvements (especially around allocations) in
ActivatorUtilities.CreateInstance
The text was updated successfully, but these errors were encountered: