No optimizing compiler for you!

Recently I decided to make the move to VisualC++7.1 (aka .Net 2003), from the rather long-in-the-tooth version 6.0 which has seen me through the last eight years or so. I was kind of glad to see that Microsoft offered fewer packages than they used to; I assumed it would make my decision easier. In fact they now appear to offer only one standalone VisualC++ package, the "Standard" edition. If you want "Professional", you have to buy the whole Visual Studio package, which costs *shitloads* more.

Now since I don’t want C#, J#, ASP, Visual Basic, etc, I figure the Standard package is the obvious choice. And even though the feature comparison chart does indicate that the standard edition doesn’t use the "powerful optimizing compiler", I assumed that it simply meant I couldn’t tweak and tune my settings. After all, it’s the only C++ standalone product they are offering— surely it wouldn’t generate unoptimized code!

I was of course, being stupidly naive in my assumption [not a rare occurrence]. Microsoft have actually seen fit to only offer one standalone version of VisualC++, which creates program files more than twice the size and about 30% slower than the old one did. When built using VC7.1, jujuedit balloons from 480K to 1.05M, and runs significantly slower as well!

This could have been the end of the story, and I might have gone to bed very cross about this bullshit crippleware tactic, had I not done a search and discovered the Microsoft Visual C++ Toolkit 2003. Amongst other things, this free toolkit from Microsoft includes:

Microsoft C/C++ Optimizing Compiler and Linker. These are the same compiler and linker that ship with Visual Studio .NET 2003 Professional!

That would be the same compiler they left out of my "Standard" package! And now they’re just giving it away!

I downloaded and install the toolkit, and sure enough, there’s cl.exe along with a few companion dlls. I copied them over the smaller, crappier ones in my VC standard install and voila! I can build an optimized application, just like a real programmer. It’s still a bit of a pain, in that the IDE still doesn’t believe that optimization is available so you have to manually add the switches, but adding "/O1" to the project settings is not such a huge chore.

Read here and here for more details about the toolkit and how it can be used…

8 Responses to “No optimizing compiler for you!”

  1. Aye. Says:

    Most of my programming is for Linux CLI and I’m not too keen on IDEs (I use a text editor and makefiles), so when I found that the free MSVC++ toolkit was crippled largely only in things I would have to click on, I thought: Score!

    I was quite surprised that they’ve included optimization functionality. I got everything else I needed from Cygwin. :)

  2. .dan.g. Says:

    hi mark, how much did it cost and where did you get it? i need to upgrade at some point and i’m looking for a good deal.dan

  3. mark Says:

    Harris Technology are currently selling it for AU$170, which is a pretty good deal I think.

  4. bling Says:

    Why buy the 2003 Standard when you can now get the optimizing one and whole lot of improvements for free with VS c++ Express (beta2). RTM Available next tuesday after VS 2005 launch.

  5. bling Says:

    Oh right.. The Express is free only for limited time.
    “We originally announced pricing of Visual Studio Express at US$49. We are now offering Visual Studio Express for free, as a limited-in-time promotional offer, until November 6, 2006″

    “Visual C++ 2005 Express Edition includes the same core optimizing compiler that will be included with all other Visual Studio 2005 editions. Some new expanded optimization features, including Profile Guided Optimizations, will be available only in the Professional and above editions of Visual Studio 2005.”

    “MFC and ATL are not included with Visual C++ 2005 Express. MFC and ATL will be included in all other Visual Studio 2005 Editions.”

    VS Orcas will be around in a year and previews in couple months though…

  6. bling Says:

    Btw if you’re short on cash but not in time, a “made in Express” content was just announced:
    http://channel9.msdn.com/ShowPost.aspx?PostID=171496
    http://www.madeinexpresscontest.com/

    Not quite sure how it goes but it seems you first submit your idea then if it’s good you probably have to code it in C++/C#/VB Express (free) and you may get some of the 3 prizes…

    You have some cool projects here already so who knows…

  7. bling Says:

    Correction.. Seems all one has to do is submit an idea.

    “Entering is as easy as submitting an idea
    The typical developer contest involves a participant developing an application from scratch to enter. In the Made In Express contest, all you need to do to enter is submit your idea.”

  8. bling Says:

    Seems my earlier comment vanished.

    The correction was about MS just announced contest where one can with 10000$ by submitting an idea that could be doable with their free VS Express products.

Leave a Reply

You must be logged in to post a comment.