Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In a C# program, what is ThePreStub?

Tags:

c#

profiling

While profiling a C# application, I see considerable CPU usage in a system (?) method called 'ThePreStub'. What is this?

like image 301
Eric Avatar asked Oct 21 '13 15:10

Eric


People also ask

What AC means?

a/ c is an abbreviation for air-conditioning. Keep your windows up and the a/c on high.

What does AC mean on a letter?

The label "in care of" simply means you are sending the letter or package to an addressee that is accepting the correspondence for the intended recipient. People often use the abbreviation "c/o" to send mail to someone they don't have an address for or to send mail to themselves at someone else's residence.

How do you spell AC unit?

Air conditioner Definition & Meaning | Dictionary.com.

What does AC mean in writing?

a/c. abbreviationin writing. ​(especially British English) account.


1 Answers

See: CLR Inside out - The Performance Benefits of NGen.

Throughput of NGen-compiled code is lower than that of JIT-compiled code primarily for one reason: cross-assembly references. In JIT-compiled code, cross-assembly references can be implemented as direct calls or jumps since the exact addresses of these references are known at run time. For statically compiled code, however, cross-assembly references need to go through a jump slot that gets populated with the correct address at run time by executing a method pre-stub. The method pre-stub ensures, among other things, that the native images for assemblies referenced by that method are loaded into memory before the method is executed. The pre-stub only needs to be executed the first time the method is called; it is short-circuited out for subsequent calls. However, every time the method is called, cross-assembly references do need to go through a level of indirection. This is principally what accounted for the 5-10 percent drop in throughput for NGen-compiled code when compared to JIT-compiled code.

like image 147
Habib Avatar answered Sep 30 '22 08:09

Habib