-
Notifications
You must be signed in to change notification settings - Fork 5k
[mono] Re-enable HAS_CUSTOM_BLOCKS for non-amd64 Mono #107358
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
[mono] Re-enable HAS_CUSTOM_BLOCKS for non-amd64 Mono #107358
Conversation
Tagging subscribers to this area: @steveisok, @lambdageek |
This comment was marked as resolved.
This comment was marked as resolved.
oops, class must be public @EgorBot -mono -arm64 using BenchmarkDotNet.Attributes;
public class Bencha
{
byte[] data = new byte[512];
[Benchmark]
public void Clear() => data.AsSpan().Clear();
} |
Seems like it regresses Jit-arm64 EgorBot/runtime-utils#65 (comment) |
Let me try the interp: @EgorBot -mono -arm64 -x64 --envvars MONO_ENV_OPTIONS:--interpreter using BenchmarkDotNet.Attributes;
public class Bencha
{
byte[] data = new byte[512];
[Benchmark]
public void Clear() => data.AsSpan().Clear();
} |
Indeed, Thank you for running the measurements. I'm trying to get some local measurements as well and I'll investigate more. I added |
I suspect that indeed can help interpeter (because 1 block copy is faster than 8 scalars) and maybe LLVM is not able to merge 8 scalars into SIMD (SLP) due to some lack of aliasing/alignment info, at least on x64 |
I've checked locally and this fixes However, I don't like that it regressed MonoJIT-arm64, e.g.:
I will have to investigate more where the block optimizations are made. |
Superseded by #107558. |
Yes, sorry I forgot to close this PR. We decided to do full revert based on the investigation in #107308 (comment). We will address the regression in #106822. |
We've seen a bunch of regressions on WASM, AOT-arm64 and Interp-arm64 microbenchmark after #106764. Rather than reverting the PR and loosing the gains on x64 MonoJIT, we can try limiting the change to x64.
Regressions: