473,659 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Optimizing code - is /O2 faster that /Ox ???

The MSDN techdocs are somewhat limited on this and I wanted more
information. Is there any resource that says definitively which is
faster /O2 or /Ox and by how much?
Jul 21 '05 #1
70 2577
"grün" <gr**@copperdog .gro> wrote in
news:d1******** *************** *********@4ax.c om...
The MSDN techdocs are somewhat limited on this and I wanted more
information. Is there any resource that says definitively which is
faster /O2 or /Ox and by how much?


This is a C++ compiler question, I think this is the wrong ng.
Anyway, I doubt another ng could give you a clear answer: This always
depends on the code you write and on the target machine; The only way to
know for sure is to do benchmarks with performance critical code on a broad
number of machines.

Niki
Jul 21 '05 #2
Niki,
This is a C++ compiler question, I think this is the wrong ng.


Why are all VBNet and C# questions answered in this NG and can that not with
C++?

(When I answer VBNet questions here, I tell always that there is a better
newsgroup, however I have the idea that I am the only one).

As forever not meant as flame

:-)

Cor
Jul 21 '05 #3
Cor Ligthert wrote:
Niki,
This is a C++ compiler question, I think this is the wrong ng.


Why are all VBNet and C# questions answered in this NG and can that
not with C++?


Because the question isn't about .NET in general. It is about native code
optimization, and I'm pretty sure you'll get a much better answer in one of
the *vc* groups anyway ;-)

The same goes for C# and VB.NET specific questions. These don't belong here
either. Unfortunately, too many users still cannot tell the difference
between a language question and a framework question or are just too lazy
:-(

Cheers,

--
Joerg Jooss
jo*********@gmx .net
Jul 21 '05 #4
"Cor Ligthert" <no**********@p lanet.nl> wrote in
news:uV******** **********@TK2M SFTNGP10.phx.gb l...
Niki,
This is a C++ compiler question, I think this is the wrong ng.
Why are all VBNet and C# questions answered in this NG and can that not
with
C++?


Because this is a question about unmanaged code. In managed code,
optimization is done by the JIT.
(When I answer VBNet questions here, I tell always that there is a better
newsgroup, however I have the idea that I am the only one).


Err... I think I did exactly that...

Niki
Jul 21 '05 #5
Please post VC related questions to the specialized NG :
microsoft.publi c.dotnet.langua ges.vc
Willy.

"grün" <gr**@copperdog .gro> wrote in message
news:d1******** *************** *********@4ax.c om...
The MSDN techdocs are somewhat limited on this and I wanted more
information. Is there any resource that says definitively which is
faster /O2 or /Ox and by how much?

Jul 21 '05 #6
Err... I think I did exactly that...


Where when it was about C# or VBNet, than I will excuse myself to you

Cor
Jul 21 '05 #7
Joerg,

A special reason why you deleted the part where I wrote about answering in
the language NG in this messages.

When you quote than please do it correct and do not put a message in a
different meaning by deleting essential parts of the original message or
delete the complete message.

To show you an example what you wrote in the style you did with mine as I do
it with yours.
Because the question is about .NET in general.
The same goes for C# and VB.NET specific questions. These belong here


You wrote that, I only deleted some essential parts the same as you did.

Cor
Jul 21 '05 #8
"Cor Ligthert" <no**********@p lanet.nl> wrote in
news:OJ******** ******@tk2msftn gp13.phx.gbl...
Err... I think I did exactly that...


Where when it was about C# or VBNet, than I will excuse myself to you


Well, I did answer the guy's question to the best of my knowledge, and I
told him there are better ng's for his qeustion. I really don't see your
point.

Niki
Jul 21 '05 #9
Niki,
Err... I think I did exactly that...


Where when it was about C# or VBNet, than I will excuse myself to you


Well, I did answer the guy's question to the best of my knowledge, and I
told him there are better ng's for his qeustion. I really don't see your
point.

This was the primair point of my question:
Why are all VBNet and C# questions answered in this NG and can that not with
C++?

Cor
Jul 21 '05 #10

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

Similar topics

7
2318
by: Andreas Paasch | last post by:
I've finally gotten my nice little system working and it's gone live. Now, I spent time optimizing my code and adding a little smart functionality here and there, based on needs and simplicity. In this context, I was wondering about something. I have a growing include.inc file that holds all my functions in it. Thinking speed, I was thinking that it might be a bit faster to split that include.inc file up into the different functions...
13
1871
by: Nickolay Kolev | last post by:
Hi all, I am currently writing some simple functions in the process of learning Python. I have a task where the program has to read in a text file and display some statistics about the tokens in that file. The text I have been feeding it is Dickens' David Copperfield. It is really simple - it reads the file in memory, splits it on whitespace, strips punctuation characters and transforms all remaining
15
1773
by: Jacek Generowicz | last post by:
I have a multiple disptacher which, conceptually, looks something like this: class Multimethod: def __init__(self): self.methods = {}
14
1681
by: Ian Richardson | last post by:
I'm writing a large Javascript application (uncompressed source around 400K) which is doing almost all the initialisation it needs to in a just-in-time manner. However, I have included an option for almost all of this to be done when the application first starts. Under this circumstance, and since the last few nightly builds of Mozilla, I've been getting: Script warning:
3
3324
by: PWalker | last post by:
Hi, I have written code that I would like to optimize. I need to push it to the limit interms of speed as the accuracy of results are proportional to runtime. First off, would anyone know any resources that explains how to optimize code i.e. give some rules on c++ optimization? e.g. using memcpy to copy an array (which i have done). Also, what is the best sorting algorithm out there for sorting an array of of size 100 or less? I have...
8
1947
by: Hagen | last post by:
Hi, I have a question that you probably shouldn´t worry about since the compiler cares for it, but anyways: When you run your compiler with optimization turned on (eg. g++ with -Ox flag) and your program gets significantly faster than without, did you write bad code/ have a bad design? Cause what happens in those optimization steps is, I think, mostly
4
1473
by: Flashman | last post by:
A little confusing with setting up optimizing options with 2003 .NET. Under the Optimization Tab. if you set to /O1 or /O2 is the program ignoring the settings for Inline Function expansion, Enabling of Intrinsic? Would seem these should be greyed out to let you know. Bigger question is what have people found in setting up the optimizing? Using /O1 or /O2 ? Any ideas would be greatly appreciated.
24
3153
by: Richard G. Riley | last post by:
Without resorting to asm chunks I'm working on a few small routines which manipulate bitmasks. I'm looking for any guidance on writing C in a manner which tilts the compilers hand in, if possible, a compiler/underlying processor independant way : althought to be fair I cant see this stuff on anything other than x86, but who knows. I found some ok info here: http://www.eventhelix.com/RealtimeMantra/Basics/OptimizingCAndCPPCode.htm...
6
2506
by: peter_k | last post by:
Hi, Last time i'm interested in optimizing small c programs. On my studies we are sending the programs using the web interface to online judge. The person who will wrote the faster program get the bonus score. This are usually simple problems, like sorting small numbers, parsing the text and checking something etc... To get the bonus the good algorithm is not everything, you have to do a lot of optimizations on c level (or asembler...
10
2427
by: anon.asdf | last post by:
Here's a reminder of duff's device: /*************************************/ #include <stdio.h> #define STEP 8 #define MAX_LEN STEP*4+1 #define SOURCE_LEN 28
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8332
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.