Where required there are ways to force it to inline/devirtualise yourself. For example using refied generics is one way I've seen - i.e. there is no interface/virtual casting since it takes a type that implements interface, rather than the interface itself. It allows you to make polymorphism compile time rather than runtime. Seem comparison libraries to Java (closed source) that have run much faster as a result.
I do find people comparing Java and .NET Core often are compare apples to oranges however. Working on both languages it is just my opinion but the .NET platform is newer - it has a better "base" even without the same man hours. Much of the engineering time in both ecosystems is spent optimising for code typical to that ecosystem which is affected by history/legacy like any other software system.