[Question] Can Virtual Stub Dispatch be "inlined"? #7198
Labels
area-VM-coreclr
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
question
Answer questions and provide assistance, not an issue with source code or documentation.
Milestone
Investigation of dispatch costs
There are 3 states for an interface callsite
For a monomorphic interface call it always goes via a stub to do dispatch; which is roughly the same cost as 2 chained non-inlined direct calls:
Which is in line with the BoTR Virtual Stub Dispatch where the call site; calls stub; which calls method
![Figure 1](https://raw.githubusercontent.com/dotnet/coreclr/master/Documentation/images/virtualstubdispatch-fig4.png)
For 1 resolved type (monomorphic) it looks roughly like this (excuse the pseudo-code)
However if the LookupStub and ResolveStubs returned 0 as MT then the DispatchStub could be turned into a regular POCO and the call inlined?
Comparable examples
Inline caches in Smalltalk, Java, Javascript
Question
Would there be any benefit to this change?
The text was updated successfully, but these errors were encountered: