.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

What optimizations does the C# compiler perform when you use the /optimize+ compiler option?

Posted By :nishithraj     Posted Date :November 30, 2009    Points :10   Category :C# 
The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get rid of try-finally with an empty try. We get rid of try-finally with an empty finally. We optimize branches over branches: gotoif A, lab1 goto lab2: lab1: turns into: gotoif !A, lab2 lab1: We optimize branches to ret, branches to next instruction, and branches to branches.

You can also find related Interview Question to What optimizations does the C# compiler perform when you use the /optimize+ compiler option?  below: 

What is DML Compiler?

It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand. (More...)

What are the different compiler generated methods when a .NET delegate is compiled?

Compilation of a .NET delegate results in a sealed class with three compiler generated methods whose parameters and return values are dependent on the delegate declaration. The methods are,
BeginInvoke() and
EndInvoke(). (More...)

What is the role of compiler?

Compiler translates a high level language into machine language. (More...)

what is the difference between compiler and interpreter?
give any one example for interpretter?

An interpreter reads each line of the source code and
converts it to machine code on the fly. This happens every
time the programme is run. Consequently it is very slow as
it is converting source code to machine code while the
programme is running.

A compiler does it once and thats it.

DOS BASIC is an example for interpretter. (More...)

is JavaScript a compiler or interpreter.if so why?

javascript is a scripting language that executes on client browser.
its a interpreter language whereby script executes before compilation (More...)

What is JIT compiler

It is a compiler which converts MS IL code to Native Code (ie.. CPU-specific code that runs on the same computer architecture). Just-In-Time compiler- it converts the language that you write in .Net into machine language that a computer can understand.

What is the data structures used to perform recursion?

Stack. Because of its LIFO (Last In First Out) property it remembers its 'caller' so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls.
Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used. (More...)

To perform asynchronous data access, what must be added to the connection string?

Select Correct Answer.

1. BeginExecute=true
2. MultiThreaded=true
3. MultipleActiveResultSets=true
4. Asynchronous=true

Correct Answer:
4. Asynchronous=true (More...)

Why do we use Option Explicit?

Correct answer is - This statement force the declaration of
variables in VB before using them. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend