Uh oh!
There was an error while loading. Please reload this page.
Don't define HAS_CUSTOM_BLOCKS on mono - #106764
Conversation
EgorBo
commented
Aug 21, 2024
@EgorBot -mono --filter System.Memory.ReadOnlyMemory.ToArray |
EgorBot
commented
Aug 21, 2024
Benchmark results on Intel
|
@matouskozak PTAL, it fixes the issue according to the benchmark in #106764 (comment) |
matouskozak
commented
Aug 21, 2024
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
matouskozak
left a comment
There was a problem hiding this comment.
Thank you for the fix and help with investigating the issue.
I don't think that MonoJIT (or other Mono codegens) have this guarantee to unroll blocks (<= 64 bytes) so I think this is a good fix. @BrzVlad do you know otherwise?
We do unroll copies, in |
Looking at the codepaths for |
BrzVlad
commented
Aug 22, 2024
That should still emit a |
matouskozak
commented
Aug 22, 2024
We might want to backport this fix to .NET 9 due to the severity of the perf regressions dotnet/perf-autofiling-issues#33182@jkurdek@vitek-karas.
Thank you, you're right. However, we are taking this path runtime/src/mono/mono/mini/memory-access.c Line 221 in 169e22c mini_emit_memcpy because we pass size / align > MAX_INLINE_COPIES (klass min_align is 1). As a future work, we could try tweaking the MAX_INLINE_COPIES heuristics. |
EgorBo
commented
Aug 22, 2024
/backport to release/9.0 |
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10505141188 |
xtqqczze
commented
Aug 22, 2024
Is there an issue tracking this missed optimization? |
matouskozak
commented
Aug 22, 2024
I'm not aware of it so I created it #106822. |
This reverts commit 7266021.
This reverts commit 7266021.
Fixesdotnet/perf-autofiling-issues#33182 regressions