-
Notifications
You must be signed in to change notification settings - Fork 6
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
Faster type activation #107
Comments
I've updated to reflect the currently implemented API. Added a load of basic tests to ensure that it works. Will need to add a lot more to cover things like generics etc, but I should imagine that they will be fine. Think @danielcirket was interested in some performance stuff? He has some numbers from local benchmarking that will be shared at somepoint. My local tests seem to indicate that the current implementation is faster from a cold start. I still need to think about the use of the concurrent dictionary inside the current implementation also. |
https://github.com/sblackler/compose/pull/1 - Added some basic benchmarks for you @sblackler, super crappy way of doing it, need a better way of doing it to get the output etc, but at least gives an idea of the perf differences so far! Done the PR to your WIP branch for now, but feel it should be mentioned here too. |
Initial results from my machine (Times in milliseconds with 10k iterations): new - Single Params | Min: 0 | Max: 0.6439 | Avg: 0.000204689999999994 Activator - No Params | Min: 0 | Max: 0.0789 | Avg: 0.000201419999999988 Activate - No Params | Min: 0 | Max: 0.0153 | Avg: 0.00024144000000001 |
As per #104, we should probably have a way of quickly creating types with given arguments. Relying on
Activator.CreateInstance
is okay, but we can do better.Proposed API:
This would cover the current use cases of Compose. However, there might be need for a generic API in the future, this will be covered as an extension to this API in the future.
The text was updated successfully, but these errors were encountered: