dotnet / dotnet/runtime

[NativeAOT Arm64] Opportunistic light-up for Atomics instructions

Open
#129,951 8 comments 0 reactions 0 assignees View on GitHub
arch-arm64 area-NativeAOT-coreclr tenet-performance
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

NAOT is stuck with the slower atomics instructions on Arm64 (and soon on other architectures). We know that doing an opportunistic check for the single instruction atomic variants can provide significant benefits. Consider implementing this optimization for managed Interlocked APIs in NAOT.

More context in https://github.com/dotnet/runtime/pull/129683#discussion_r3460554679

Contributor guide

Open the contributing guide

Research direction

Start with the linked discussion in PR 129683, then trace the managed Interlocked APIs in NativeAOT and how Arm64 atomics are selected. Done means NativeAOT can opportunistically use the single-instruction atomic variants while preserving correct Interlocked behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
compilers, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.