Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the relative costs for the different types of method calls in .NET Compact Framework applications?

0
Posted

What are the relative costs for the different types of method calls in .NET Compact Framework applications?

0

Having a mental model of the relative costs of various types of method calls can help you make design tradeoffs that will result in better performing applications. The following bullet points summarize how the costs of various types of calls related: Instance calls are ~2-3X the cost of a native function call Virtual calls are ~1.5X the cost of a managed instance call. See the entry above about virtual method costs for more details. Platform invoke and COM calls are ~5-6X the cost of managed instance call (this data is passed on calling a method that requires the marshaling of a single int parameter). See the entry below about platform invoke costs for more details.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123