473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Optimize option

Hi there,

I recently came across an interesting option when right clicking on a
project (Right click on the project -> properties -> Configuration
Properties ->Build -> Optimize)

There is an option in there to optimize the code, has anyone had any
expeiance / problems with this option and were there any significant gains
in performance by turning on this setting?

Below are some extracts from the help files on the setting.

Cheers,
Daniel
Optimize code
Enable or disable optimizations performed by the compiler to make your
output file smaller, faster, and more efficient. See /optimize for more
information.
See Optimize Property for information on how to programmatically access this
property.
Remarks
The /optimize option enables or disables optimizations performed by the
compiler to make your output file smaller, faster, and more efficient.
/optimize also tells the common language runtime to optimize code at
runtime.
By default, /optimize- is in effect. Specify /optimize+ to enable
optimizations.
When building a module to be used by an assembly, use the same /optimize
settings as those of the assembly.
/o is the short form of /optimize.
It is possible to combine the /optimize and /debug options.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Setting
Visual C# Project Properties.
Click the Configuration Properties folder.
Click the Build property page.
Modify the Optimize code property.
To set this compiler option programmatically
See Optimize Property.
Example
Compile t2.cs and enable compiler optimizations:
csc t2.cs /optimize
Nov 15 '05 #1
0 1972

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: André Nęss | last post by:
Photoshop has a function called optimize to file size which tries to fit an image to some given file size. Because I need to make sure no images on a site I'm working on are larger than X KB I need...
0
by: Andreas Falck | last post by:
Hi, I ran the code below on two different versions, 4.0.14 and 4.0.16 respectively, both running RH 7.3 on intel. In version mysql server version 4.0.14 the SELECT privelege suffices for...
4
by: mjuricek | last post by:
I'm having some problems to optimize my stored procedure (select statement with joins) What I'm trying to do is calculate total work. My situation: I have 3 tables I'm using -Input (char...
5
by: xeqister | last post by:
Greetings all, We have a complicated statement in DB2 which takes long hour to complete and we have created most of the indexes. Does anybody knows how to tune the following statement to optimize...
2
by: noleander | last post by:
I'm trying to get Vis C++ std to compile using /O2 optimizing flag. Many people have suggested downloading the MS C++ 2003 Toolkit ... it supposedly has C++ compiler bins that one could use. I...
2
by: Jusan | last post by:
hi, I have written a cheque writing utility in vb.net and would like to invite comments on the code. can this be done in a better / faster / shorter way? thnx Public Class...
2
by: Aaron | last post by:
Hello all, I have 5 warnings only but I want to know how to "optimize" my code so that it is "clean." The warning is this with all 5 the same Warning 1 Variable 'strxxx' is used before it has...
3
by: zhangyue.zl | last post by:
For a source file ,which optimize option can make gcc generate a smaller object file,O2 or O3? Thanks!
15
by: kenneth | last post by:
I was trying to use multiple thread to optimize my following code, but met some problems, anyone can help me? k are initialized. int computePot() { int i, j; for( i=0; i<500; i++ ) { for(...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.