Skip to content

[Arm64/Unix] Use native memcpy/memmove for ARM64 as glibc 2.36 added optimizations #93579

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ namespace System
{
public static partial class Buffer
{
#if TARGET_ARM64 || TARGET_LOONGARCH64
#if TARGET_LOONGARCH64
// Managed code is currently faster than glibc unoptimized memmove
// TODO-ARM64-UNIX-OPT revisit when glibc optimized memmove is in Linux distros
// https://github.com/dotnet/runtime/issues/8897
private static nuint MemmoveNativeThreshold => nuint.MaxValue;
#elif TARGET_ARM
#elif TARGET_ARM || TARGET_ARM64
private const nuint MemmoveNativeThreshold = 512;
#else
private const nuint MemmoveNativeThreshold = 2048;
Expand Down