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
Consider wrapping throw in call to encourage JITter #320
Comments
So, to elaborate here... Apologies, priorities abound... In general we should, when throwing in potentially hot methods, prefer to call a As a very good example
the fact we are throwing actually causes a number of optimizations to not happen and can also impact inline ability. An example refactoring would be:
|
Further Docs and explanation of potential value for perf: (FWIW these are from CommunityToolkit's Diagnostic analyzer docs, https://learn.microsoft.com/en-us/dotnet/communitytoolkit/diagnostics/throwhelper#technical-details We probably should have some form of:
And use that when throwing on hot paths/etc. [0] - I think that analyzer will only really work if we take |
Makes sense. Also runtime libs are always using this. We could start with read/write loops maybe? |
NIT/Future: Consider wrapping throw in call to encourage JITter.
Originally posted by @to11mtm in #303 (comment)
The text was updated successfully, but these errors were encountered: