GeekInterview.com
Series: Subject: Topic:
Question: 417 of 460

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

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.

Asked by: Interview Candidate | Asked on: Sep 13th, 2004

This Question is not yet answered!

Related Open Questions

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.