Victor Pekurovsky

Hello,

The same code works slowly for Visual C++ .Net in 2005 ( Release mode )

We have these compilation options for 2003

cl -nologo -c -FoWIN32/advfrnt.o -MD -O2 -G7 -W3 -GR -EHsc -DIFORTRAN -Za -QIfdiv- -Gs -YX-Zm300 -Ogtyb1 -DALTAIR -DNDEBUG -DWIN32 -DPC -DOS_WIN -D_MBCS -DLITTLE_ENDIAN_MACHINE -DHMDEBUG -DMSVC -DNT -DWINNT -DNO_DTORS -D_WINDOWS -DPC -D_X86_ -DAS_COMPRESSION

and options

cl -nologo -c -Fowin32/advfrnt.o -FRwin32/advfrnt.sbr -MD -O2 -GS- -W3 -GR -EHsc -FC -DIFORTRAN -Za -Gs - -Zm300 -Ogtyb1 -DALTAIR -DNDEBUG -D_SECURE_SCL=0 -DWIN32 -DOS_WIN -D_MBCS -DLITTLE_ENDIAN_MACHINE /wd4996 -DNHMDEBUG -DMSVC -DNT -DWINNT -DNO_DTORS -D_WINDOWS -DPC -DWINVER=0x0501 -D_WIN32_WINDOWS=0x0501 -D_X86_ -DAS_COMPRESSION -DDGFI_IMPORT

for 2005.

Is there any option in 2005 compiler that could decrease perfomance

Thanks in advance,

Victor



Re: Visual C++ General .Net 2005 works slowly than .Net 2003

Jonathan Caves - MSFT

I am not certain if you are asking about the performance of the compiler or the performance of the generated code. Your title tends to imply the former so that is the question I will answer.

The main thing I can see is that 2003 is using /YX (automatic precompiled headers) while 2005 is not using any pre-compiled headers - that change alone could really slow down your build time. Also 2005 is generating browse-info (/FR) while 2003 is not - so 2005 is doing more work which longer build times.






Re: Visual C++ General .Net 2005 works slowly than .Net 2003

Victor Pekurovsky

Thank you very much for answer. I will try to recompile code without YX and FR options.

My question was about the performance of the generated code.

Victor





Re: Visual C++ General .Net 2005 works slowly than .Net 2003

Victor Pekurovsky

Are there any options that could affect the performance of the generated code

Thanks,

Victor





Re: Visual C++ General .Net 2005 works slowly than .Net 2003

Jonathan Caves - MSFT

Are you doing a lot of floating point calculations If you are then you should take a look at this page.






Re: Visual C++ General .Net 2005 works slowly than .Net 2003

Lord Zoltan

Although it would appear that your code is set to -MD, it might be worth looking over this thread as well: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=128907&SiteID=1

beyond that it's difficult to know without having an example of code that is running at different speeds.