-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove redundant static fields to reduce memory usage in XamlTypeInvoker #4027
Remove redundant static fields to reduce memory usage in XamlTypeInvoker #4027
Conversation
@lindexi - Do you have any benchmarks reports associated with this PR? |
@pchaurasia14 It just remote a static field. And I think it hard to write the benchmarks code. |
@lindexi @pchaurasia14 The original code could be "faster" thanks to code-locality, the PR however saves few bytes in the class. If code-locality doesn't play a factor, both shall be equal in terms of performance. In my opinion the perfect answer doesn't exist, code-gen itself is gonna be identical, It is basically always going to boil down to this for a method that takes an arr as a param (obviously in case of the particular method in question, that would be already mov rdx, 0x17664001eb8 ;immediate singleton ptr
mov rdx, [rdx] ;pass empty array ptr to func
call 0x00007ffbc4e90030 ;the function call [MethodImpl(MethodImplOptions.NoInlining)]
private object[] EmptyMethod(object[] array)
{
return suggestions;
} |
f2203d9
to
995d024
Compare
Thank you @lindexi |
No description provided.