Help - Search - Members - Calendar
Full Version: standard vs pro editions of VC++
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
toobs1234
Stupid newbie question for you guys...

I am using the standard edition of VC++ .NET 2003. I built the convolver plugin (Gian-Carlo kindly provided the source code). Everything runs, but the dll I get is 212kB compared to 294kB for Gian-Carlo's version and my version is MUCH more processor intensive. It is processor intensive enough as to be unusable. I assume that this is because of the non-optimizing version of VC++ that I am using, but I'd just like confirmation that the difference is this huge. I'm afraid the pro version is beyond my budget :-(

John
PoisonDan
AFAIK, the compiler/optimizer is identical for all editions of VC++, and the Pro version only has additional features and tools.

Why don't you ask Garf what kind of optimizations or switches he used for building the component?

toobs1234
QUOTE(PoisonDan @ Mar 1 2005, 01:57 PM)
AFAIK, the compiler/optimizer is identical for all editions of VC++, and the Pro version only has additional features and tools.

Why don't you ask Garf what kind of optimizations or switches he used for building the component?
*



According to amazon.com, where I bought Visual C++ .NET 2003 Standard Edition (could they think of a longer name?), the standard edition is "intended for educational purposes" and does not optimize. After doing more digging around, though, I did find a switch for three build configurations: "debug", "release", and "ANSI release". I switched from debug to release and now the compiled dll is much less CPU intensive. However, the CPU usage is at 50% compared to 20% for Garf's dll (on a 300mHz Pentium II notebook). At least it is usable now. I can worry about optimizing later.

I'm trying not to bug Garf with a bunch of stupid questions because I know eventually I am going to hit a brick wall on something and really need his help to get over it (I'm trying to turn his stereo in/stero out convolve plugin into a 5.1 in/15.1 out crossover plugin). I'm also trying not to bother this group with a bunch of stupid questions. I'm actually pretty proud I figured out how to build the darn thing on my own...programming sure has become a lot more complicated since my school days.

thanks for the help and best regards, John
sony666
hum.. I don' know about the standard version you are talking about.
try this:
open the Vislual Studio development console (in startmenu under Net 2003/Tools) and type cl.exe
it should say "microsoft visual C++ optimizing compiler version xx.xxxxx blabla). if it does, it is the normal, comercial one smile.gif
shaneh
If you read this link: http://msdn.microsoft.com/visualc/vctoolkit2003/

Microsoft make the optimizing compiler free for download, so I cant imagine youd have anything different. Besides, its very unlikely the optimisations it makes would be noticeable at all, in such a small piece of code. Optimisations on tight loops of code are done in any decent compiler, and youd be hard pressed to notice a difference between any. The optimising compiler does optimisations over the whole code to make it more efficent etc. Its only really noticiable on many many different instructions with highly abstracted code. Not with tight loops over the same instructions.

The Debug build makes a *huge* difference, and is obviously your problem. Try different builds, and compiler options. Are you using the original project files with compiler options included? (I assume so, if you have those build names). If not, there are *many* different compile options which could be causing issues. HAve you tried the ANSI release build yet?

It could also be your version of msvcr.lib that you are linking against. In VS.net 2003, it links to msvcr71.dll, which does things like stack protection and so forth. In older versions, msvcr.lib links to msvcr.dll, which is a bit leaner, but not as mature.

Did it ask to convert the project when you loaded it? IF so, try going in and turning stack protection off (the /GS or something switch), because it was probably enabled.
toobs1234
QUOTE(sony666 @ Mar 1 2005, 05:01 PM)
hum.. I don' know about the standard version you are talking about.
try this:
open the Vislual Studio development console (in startmenu under Net 2003/Tools) and type cl.exe
it should say "microsoft visual C++ optimizing compiler version xx.xxxxx blabla). if it does, it is the normal, comercial one smile.gif
*



It says microsoft ® 32-bit C/C++ Standard Compiler Version 13.10.3077

Here is a blurb from amazon.co.uk (where I bought it):

Does this mean anything to you?
toobs1234
QUOTE(shaneh @ Mar 1 2005, 05:18 PM)
If you read this link: http://msdn.microsoft.com/visualc/vctoolkit2003/

Microsoft make the optimizing compiler free for download, so I cant imagine youd have anything different. Besides, its very unlikely the optimisations it makes would be noticeable at all, in such a small piece of code. Optimisations on tight loops of code are done in any decent compiler, and youd be hard pressed to notice a difference between any. The optimising compiler does optimisations over the whole code to make it more efficent etc. Its only really noticiable on many many different instructions with highly abstracted code. Not with tight loops over the same instructions.

*



Here is a blurb from the Amazon.co.uk website (where I bought it):

"This is the Standard edition, which is primarily intended for learning. Although it has all you need to create both Windows and Web applications, the compiler is non-optimising. Professional developers should consider Visual Studio.NET Professional Edition 2003, which includes a more advanced version of Visual C++ as well as the other .NET languages such as Visual C# and Visual Basic."

I understood that to mean it wouldn't use anySSE/SIMD instructions, but I looked at the Amazon.com web site and there they say explicitly that the standard version does optimize.

QUOTE(shaneh @ Mar 1 2005, 05:18 PM)
The Debug build makes a *huge* difference, and is obviously your problem. Try different builds, and compiler options. Are you using the original project files with compiler options included? (I assume so, if you have those build names). If not, there are *many* different compile options which could be causing issues. HAve you tried the ANSI release build yet?
*



Yeah, debug does make a difference alright. I haven't tried ANSI release yet, but will.

QUOTE(shaneh @ Mar 1 2005, 05:18 PM)
It could also be your version of msvcr.lib that you are linking against. In VS.net 2003, it links to msvcr71.dll, which does things like stack protection and so forth. In older versions, msvcr.lib links to msvcr.dll, which is a bit leaner, but not as mature.

Did it ask to convert the project when you loaded it? IF so, try going in and turning stack protection off (the /GS or something switch), because it was probably enabled.
*



Yes it did ask to convert. I'll give everything a try. I can't thank you enough for all the pointers. This is all a bit overwhelming at first. I have managed to modify the plugin so that it loads two impulse files, computes FFTs on them and updates the user interface. Unfortunately, it freezes when I hit play--one hurdle at a time. I actually never thought I would get this far in just one day.

thanks again, John
Otto42
Download and install the VC++ 2003 toolkit. This contains the same optimized compiler in the pro edition, and the relevant files can simply replace the existing ones you have with the standard edition. Just copy them right over. Then you'll have the optimizing compiler automagically. Works great.

And yes, the optimizing compiler makes a *huge* difference, by all accounts.
toobs1234
QUOTE(Otto42 @ Mar 1 2005, 06:36 PM)
Download and install the VC++ 2003 toolkit. This contains the same optimized compiler in the pro edition, and the relevant files can simply replace the existing ones you have with the standard edition. Just copy them right over. Then you'll have the optimizing compiler automagically. Works great.

And yes, the optimizing compiler makes a *huge* difference, by all accounts.
*



Cool. I did a little searching on the net. It seems like you just have to copy over everything in the toolkit bin to the standard edition bin. However, I am not sure how to set the optimization options. Apparently you can't do it from the project properties dialog. Someone said you can edit those through the "additional options" dialog, but I can't find that. Any ideas where?

John
shaneh
It is under "Command Line" under the "C/C++" configuration properties. You will need to learn the switches necessary to add whatever options you want to add. I honestly don't think you will get that much performance difference, especially if the original was compiled with VC6 (Im assuming if the project needed to be converted).

Im guessing there is some other issue, such as the libraries you are linking to, or the fact your not using the ANSI build etc.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.