|
INTERVIEW QUESTIONS
MICROSOFT
C#
DETAILS
Question: What optimizations does the C# compiler perform when you use the /optimize+ compiler option?
Answer: 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 w/ an empty try. We get rid of try-finally w/ an empty try (convert to normal code...). We get rid of try-finally w/ an empty finally (convert to normal code...). 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.
|
|
|
Category |
C# Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 10226 users |
Added on |
10/24/2009 |
Views |
77276 |
Rate it! |
|
|
Question:
What optimizations does the C# compiler perform when you use the /optimize+ compiler option?
Answer:
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 w/ an empty try. We get rid of try-finally w/ an empty try (convert to normal code...). We get rid of try-finally w/ an empty finally (convert to normal code...). 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. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How can I access the registry from C# code?
|
View Answer
|
|
Does C# support #define for defining global constants?
|
View Answer
|
|
Is there any sample C# code for simple threading?
|
View Answer
|
|
Is there regular expression (regex) support available to C# developers?
|
View Answer
|
|
Why do I get a security exception when I try to run my C# app?
|
View Answer
|
|
Does C# support parameterized properties?
|
View Answer
|
|
How do you inherit from a class in C#?
|
View Answer
|
|
Does C# support multiple inheritance?
|
View Answer
|
|
Describe the accessibility modifier protected internal.
|
View Answer
|
|
C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?
|
View Answer
|
|
What is a delegate?
|
View Answer
|
|
What is a multicast delegate?
|
View Answer
|
|
What are the ways to deploy an assembly?
|
View Answer
|
|
What is a satellite assembly?
|
View Answer
|
|
What namespaces are necessary to create a localized application?
|
View Answer
|
|
What is the difference between // comments, /* */ comments and /// comments?
|
View Answer
|
|
How do you generate documentation from the C# file commented properly with a command-line compiler?
|
View Answer
|
|
Is XML case-sensitive?
|
View Answer
|
|
What does the This window show in the debugger?
|
View Answer
|
|
What does assert() do?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All C# Interview Questions & Answers - Exam Mode /
Learning Mode
|