You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Perf] Linux/arm64: 1 Regression in System.Tests.Perf_Int128 #104739
changed the title [-][Perf] Linux/arm64: 1 Regression on 7/9/2024 9:15:09 PM[/-][+][Perf] Linux/arm64: 1 Regression in System.Tests.Perf_Int128[/+]on Jul 11, 2024
Regardless of what we do here, can we please re-investigate having AggressiveInlining mean "for the love of all that is good in this world always inline this if it's physically possible" so we stop having these cases where inlining budget means tiny helpers stop being inlined?
Unfortunately, it's not a solution, we may inline all AggressiveInlining and then stop inlining various Span.op_Implicit inside them and other APIs which are currently don't have AggressiveInlining, instead, we should've given up on a large method so everything inside of it had more chances to inline, etc.
It's not a solution even if things marked AggressiveInlining don't consume any inlining budget?
It's not a solution even if things marked AggressiveInlining don't consume any inlining budget?
Correct, imagine you have method A (root) and you inline stuff into it. You already inlined a lot and consumed 95% of your buget, then, you encounter this big method B with AggressiveInlining on it and inline it without reducing the budget - boom - you have no budget to inline any calls inside of it, even fairly trivial ones since you only have 5% (maybe for just one)
Activity
LoopedBard3 commentedon Jul 11, 2024
Likely caused by #104506.
LoopedBard3 commentedon Jul 11, 2024
@matouskozak @tannergooding FYI
[-][Perf] Linux/arm64: 1 Regression on 7/9/2024 9:15:09 PM[/-][+][Perf] Linux/arm64: 1 Regression in System.Tests.Perf_Int128[/+]EgorBo commentedon Jul 11, 2024
I think we should just revert that change then since there were no improvemens from it, only regressions
stephentoub commentedon Jul 11, 2024
Do we know why it regressed?
EgorBo commentedon Jul 11, 2024
I bet it has something to do with struct promotion, it's nice to see safe code to be faster than unnecessary unsafe
@EgorBot -arm64 -perf -commit 8d231b4 vs 01dbf51 --disasm
EgorBot commentedon Jul 11, 2024
Benchmark results on Arm64
BDN_Artifacts.zip
Flame graphs: Main vs PR 🔥
Hot asm: Main vs PR
Hot functions: Main vs PR
For clean
perfresults, make sure you have just one[Benchmark]in your app.3 remaining items
stephentoub commentedon Jul 11, 2024
It's not a solution even if things marked AggressiveInlining don't consume any inlining budget?
EgorBo commentedon Jul 11, 2024
Correct, imagine you have method A (root) and you inline stuff into it. You already inlined a lot and consumed 95% of your buget, then, you encounter this big method
BwithAggressiveInliningon it and inline it without reducing the budget - boom - you have no budget to inline any calls inside of it, even fairly trivial ones since you only have 5% (maybe for just one)cc @AndyAyersMS
dotnet-policy-service commentedon Jul 15, 2024
Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.
jeffhandley commentedon Aug 12, 2024
@stephentoub -- Any objections to reverting Use
Unsafe.BitCastforInt128↔UInt128operators (#104506)?stephentoub commentedon Aug 12, 2024
Let's do both. We can revert for now to undo the regression, but we shouldn't need to second guess ourselves when using Bitcast.