473,771 Members | 2,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Same code 4 X slower on VC++ 7.0 than VC++ 6.0

I compiled the same code as release version in VC++ 7.0 and it runs about 4X slower. My program is doing a mathematical search where time is important... am I forced to stick with the older version of the compiler?
Nov 17 '05 #1
4 1357
I've noticed things compile and link slower in VC++7.1(.net/2003) than
VC++6. But my large (mathematical) application runs about the same speed.

I've never tried VC++7.0

Do you have the professional version (that optimizes) or the cheapo version
that does not optimize?

Rudy
"Corgan" <ve****@yahoo.c om> wrote in message
news:E9******** *************** ***********@mic rosoft.com...
I compiled the same code as release version in VC++ 7.0 and it runs about

4X slower. My program is doing a mathematical search where time is
important... am I forced to stick with the older version of the compiler?
Nov 17 '05 #2
No, enterprise version for both

----- Rudy Ray Moore wrote: ----

I've noticed things compile and link slower in VC++7.1(.net/2003) tha
VC++6. But my large (mathematical) application runs about the same speed

I've never tried VC++7.

Do you have the professional version (that optimizes) or the cheapo versio
that does not optimize

Rud
"Corgan" <ve****@yahoo.c om> wrote in messag
news:E9******** *************** ***********@mic rosoft.com..
I compiled the same code as release version in VC++ 7.0 and it runs abou

4X slower. My program is doing a mathematical search where time i
important... am I forced to stick with the older version of the compiler

Nov 17 '05 #3
Corgan wrote:
No, enterprise version for both.


Just to be sure: you're sure you're timing Release builds, right? Debug
builds with VC7{.1} are definitely slower due to the increased runtime
checks.

Is your VC7 project compiled with /GS? /RTCx? If so, turn those off before
doing timing comparisons.

How would you characterize the runtime behavior of your app - does it make
lots of allocations/deallocation? I suspect that your app might fall into a
category like that, because in general, the VC7 code generator is better
than VC6. Does your app use <iostream> a lot? If so, it might be slower
due to increased conformance in the VC7{.1} library (stadard locale support
is rather expensive, it turns out).

Do you have a profiler? (see the "DevPartner Profiler from Compuware - you
can download a free version of it that integrates into Visual Studio).

-cd
Nov 17 '05 #4
I'm an old fan of the Visual C++ 6 IDE so I'm getting used to the new one still

But I went to the project settings and made sure the Active configuration was release

It indeed runs as if it is Debug though

The app is don't alot of math... there isn't much use of <iostream> at all. It is analyzing millions of combinations. It takes my release version on 6.0 about 10 seconds to analyze one full case... on 7.0 it is taking 46 seconds. And no, there really isn't much allocation/deallocation at all. It is indeed a win32 console app. I had to convert the project from 6.0 to 7.0 though when creating the solution. Perhaps I should just create a new project and import my code... I don't see how that would work, but it may be worth a shot

I'll have to check on those compiler switches. I believe it just uses the default release build configuration except for the "Optimize for Speed" feature

----- Carl Daniel [VC++ MVP] wrote: ----

Corgan wrote
No, enterprise version for both


Just to be sure: you're sure you're timing Release builds, right? Debu
builds with VC7{.1} are definitely slower due to the increased runtim
checks

Is your VC7 project compiled with /GS? /RTCx? If so, turn those off befor
doing timing comparisons

How would you characterize the runtime behavior of your app - does it mak
lots of allocations/deallocation? I suspect that your app might fall into
category like that, because in general, the VC7 code generator is bette
than VC6. Does your app use <iostream> a lot? If so, it might be slowe
due to increased conformance in the VC7{.1} library (stadard locale suppor
is rather expensive, it turns out)

Do you have a profiler? (see the "DevPartner Profiler from Compuware - yo
can download a free version of it that integrates into Visual Studio)

-c

Nov 17 '05 #5

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

Similar topics

354
15926
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets hooked up to interfaces. The Gtk is more than enough gui.
20
5545
by: Mark | last post by:
I am using gnu g++ version 3.3.2, trying a simple test to read in and then write out a large (100,000 line) text file ########################################## CSTDIO VERSION TO READ/WRITE TEXT FILE: #include <cstdlib> #include <cstdio> using namespace std;
143
8102
by: suri | last post by:
Hello I downloaded glibc and tried looking for the code that implements the sine function i couldnt find the file. i went to the math directory and found math.h.. i guess that needs to be included for the sine function. but which .c file implements the sine/cosine and other trig fns thanks
0
1806
by: Ann | last post by:
I have a C# application that uses PrintDocument and PrintPage to draw reports. Now I need to integrate a tax form printing from a legacy VC++ DLL into the C# application. One of the important requirements is that the printing of the reports (implemented by C#) and the tax form (implemented by VC++) to be on the same print job. For example, if there are 10 clients we need to print the reports and tax form for, then 10 print jobs will be...
1
1839
by: Omid Hodjati | last post by:
Hi All, I have an old unmanaged code written in C++ 6.0. This is a time critcal, CPU bound application. I have deciede migrate this application to managed world and VC++ 7.0. The first step was to compile the 6.0 version with /clr to IL code....That was succesful ... I made clean build ! But the application didn't run. When I profiled the application execustion i saw that the managed version is 2 times slower that unmanaged version. This...
15
1222
by: TT (Tom Tempelaere) | last post by:
Hey everyone, I noticed that unlike C#, managed C++ still uses headers and implementation files. My question is, is there any consensus of where to put the implementation of the managed class? In my project, I put everything in the header file. I don't see the need to put it in a seperate implementation file. Any thoughts?
3
1542
by: JoeProgrammer | last post by:
A couple of questions re. managed vs. unmanaged code. 1. I know this depends on the app, but how much faster is unmanaged code vs. managed code? Is there an average figure for this? 2. Is it as simple as using a #pragma to convert from unmanaged to managed? And if so, can I simply change my existing code to managed with the #pragma wherever I want to eliminate transitions, or are there issues with this? -- JoeProgrammer I'm good. ...
88
8090
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
19
4142
by: glchin | last post by:
Does a compiler guarantee that the variable w below is placed on an eight-byte aligned address? void myFunction( long iFreq ) { const double w = two_pi * iFreq; ... ... }
0
9619
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
10261
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
10103
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
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9911
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6713
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.