-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Intrinsify RuntimeHelpers.CreateSpan on Mono #80762
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsContext: a lot of benchmarks regressed on Mono after #79461 and #80668 On CoreCLR the following snippet (compiled with the most recent Roslyn): static int GetInt8(int index)
{
ReadOnlySpan<byte> RVA = new byte[] { 1, 2, 3, 4 };
return RVA[index];
}
static int GetInt32(int index)
{
ReadOnlySpan<int> RVA = new int[] { 1, 2, 3, 4 };
return RVA[index];
} produces more or less the same codegen while IL is quite different - in case of
|
Tagging subscribers to this area: @BrzVlad Issue DetailsContext: a lot of benchmarks regressed on Mono after #79461 and #80668 On CoreCLR the following snippet (compiled with the most recent Roslyn): static int GetInt8(int index)
{
ReadOnlySpan<byte> RVA = new byte[] { 1, 2, 3, 4 };
return RVA[index];
}
static int GetInt32(int index)
{
ReadOnlySpan<int> RVA = new int[] { 1, 2, 3, 4 };
return RVA[index];
} produces more or less the same codegen while IL is quite different - in case of
|
@jandupej has started work on addressing this |
The issue has been addressed in #81695, closing. |
The interpreter support is still missing. |
@BrzVlad will be working on Interpreter support |
Remaining perf issues on Linux AOT x64: #83330 |
Context: a lot of benchmarks regressed on Mono after #79461 and #80668
On CoreCLR the following snippet (compiled with the most recent Roslyn):
produces more or less the same codegen while IL is quite different - in case of
ReadOnlySpan<int>
aRuntimeHelpers.CreateSpan
call is emitted by Roslyn (to handle endianness). CoreCLR has a JIT intrinsics implemented by @davidwrighton in #61079 that helps it to achieve perfect codegen here. As that PR states, Mono doesn't have that intrinsic soCreateSpan
ends up calling an icall in vm (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetSpanDataFrom
)The text was updated successfully, but these errors were encountered: