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

G

Guest

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?
 
R

Rudy Ray Moore

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 said:
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?
 
G

Guest

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 said:
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
 
C

Carl Daniel [VC++ MVP]

Corgan said:
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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top