Skip to content
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

Optimize multicast delegate thunk #104222

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Conversation

MichalStrehovsky
Copy link
Member

Alternative to #104219 for consideration.

RyuJIT generates somewhat better code for the canonical Invoke pattern:

The other PR:

00007FF7AE041978  mov         rcx,qword ptr [rbx+rbp*8+10h]
00007FF7AE04197D  mov         rax,qword ptr [rcx+8]
00007FF7AE041981  mov         rdx,qword ptr [rcx+20h]
00007FF7AE041985  mov         rcx,rax
00007FF7AE041988  call        rdx

This PR:

00007FF69D2B1978  mov         rax,qword ptr [rbx+rbp*8+10h]
00007FF69D2B197D  mov         rcx,qword ptr [rax+8]
00007FF69D2B1981  call        qword ptr [rax+20h]

Alternative to dotnet#104219 for consideration.

RyuJIT generates somewhat better code for the canonical `Invoke` pattern:

The other PR:

```
00007FF7AE041978  mov         rcx,qword ptr [rbx+rbp*8+10h]
00007FF7AE04197D  mov         rax,qword ptr [rcx+8]
00007FF7AE041981  mov         rdx,qword ptr [rcx+20h]
00007FF7AE041985  mov         rcx,rax
00007FF7AE041988  call        rdx
```

This PR:

```
00007FF69D2B1978  mov         rax,qword ptr [rbx+rbp*8+10h]
00007FF69D2B197D  mov         rcx,qword ptr [rax+8]
00007FF69D2B1981  call        qword ptr [rax+20h]
```
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@MichalStrehovsky MichalStrehovsky merged commit 1fe7d18 into dotnet:main Jul 3, 2024
85 of 87 checks passed
@MichalStrehovsky MichalStrehovsky deleted the multi branch July 3, 2024 09:08
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants