-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Speed Optimization for short living applications #26
Comments
@Fruchuxs Hi, thanks for bringing it. First, what platform did you target? Next, there maybe a more work involved, considering that on some platforms DryIoc uses custom expression compiler. But everything is possible. In FEC we probably immediately fallback to |
We also tested the FEC, but the speed up was in our cases negligible. |
@Fruchuxs, what platform did you test? |
Oh sorry, forget to advise: .net core 2.1 |
It's conceivable that on .net core 2.1 you might get a similar boost by enabling tiered compilation. It's certainly worth trying out; if that really works well, it might render the interpretation of expression trees themselves moot (because the JIT would be interpreting IL, and the conversion to IL is fairly fast with FastExpressionCompiler). |
Hi @EamonNerbonne , are you suggesting to add |
Yeah, that would be a start ;-). But I have no experience with that (new) feature, so can't tell you about any gotchas - I mean I hope there aren't any, but it's conceivable it doesn't work with dynamically generated IL or some such thing. Only one way to find out! ;-). |
Will check but their measurements doesn't look promising. |
COMPlus_TieredCompilation
Probes in seconds. |
Just a little worried about the high variance in those numbers - it might just be chance. |
Yes, this is a general problem on my working machine (it's a laptop), as suggested here. I assume it's a CPU boost / throttling Problem. But my measurements gives an idea that COMPlus_TieredCompilation=true is faster at cold start. |
Cool actually. I was sceptical, but it is a visible difference. Moreover, it affects dynamic methods as well. Thanks for trying! |
#45 should help. |
Here is the proof: benchmark, sut and the related epic #44 DryIoc v3:CreateContainerAndRegisterServices_Then_FirstTimeOpenScopeAndResolve
OpenScopeAndResolve
DryIoc v4 (preview-02)CreateContainerAndRegisterServices_Then_FirstTimeOpenScopeAndResolve
OpenScopeAndResolve
|
Looks nice, now we need this Version out. :P EDIT: Btw. really good work! |
Wow... It's coooool |
We figured out, that we can speed up the executionen of an short living application (like a console application) with
Expression<TDelegate>.Compile(preferInterpretation: true)
, because of avoiding some JIT overhead.Can you maybe add a rule to DryIoc, so we can switch between preferInterpretation: true and preferInterpretation: false for the compilation of the resolve trees?
The text was updated successfully, but these errors were encountered: