Take this explicitly to avoid argument shuffling by caller#111084
Take this explicitly to avoid argument shuffling by caller#111084xtqqczze wants to merge 1 commit intodotnet:mainfrom
this explicitly to avoid argument shuffling by caller#111084Conversation
|
I don't think this is the right thing to do. It's just saving one Moreover, emitting static local function as static is quite an implementation detail of C# compiler. |
|
@MihuBot arm64 |
True, but it does impact code size.
Presumably relying on an implementation detail is acceptable in |
|
Wouldn't this also make things worse after inlining if |
There are only several bytes of difference with no real impact. In practice, we would take the opposite approach that accepts trivial regression to simplify the code. |
|
This pattern appears elsewhere: |
|
@MihuBot -arm |
The trick in referenced code is outdated: sharplab It saves literally one |
|
|
@MihaZupan Interesting there is an improvement of 764 bytes on arm64, only 16 bytes on X64 |
@huoyaoyuan I see regressions in code size and PerfScore with the trick removed |
The "regression" is very unlikely to be impactful. PerfScore is an internal JIT term for optimization decisions. We shouldn't tweak code too much to fit the JIT, but teach JIT instead. |
This is not an exception throwing path. The trick is potentially saving extra instructions on a hot path here. It is still debatable whether this micro-optimization is worth the extra complexity. |
This improvement does not look real. It is an issue in asm-diff tooling. |
|
Thank you for a contribution, but we are not interested in complicating the code like this to save a few instructions on exception throwing paths. |
No description provided.