Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Aug 28, 2023

int Foo(Thread t) => t.ManagedThreadId;

Was:

mov      rcx, rdx
cmp      dword ptr [rcx], ecx
jmp      System.Threading.Thread:get_ManagedThreadId():int:this

Now:

mov      eax, dword ptr [rcx+0x34]
ret

@ghost ghost added the area-VM-coreclr label Aug 28, 2023
@ghost ghost assigned EgorBo Aug 28, 2023
@EgorBo EgorBo merged commit 4c01386 into dotnet:main Aug 28, 2023
@EgorBo EgorBo deleted the opt-managedthreadid branch August 28, 2023 23:06
@ghost ghost locked as resolved and limited conversation to collaborators Sep 28, 2023
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