Click here to Skip to main content
13,000,164 members (61,873 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


13 bookmarked
Posted 23 Oct 2000

A Visit to Redmond - Part 5

, 23 Oct 2000
Rate this:
Please Sign up or sign in to vote.
For those who are curious as to what a hastily scheduled trip to Redmond is like.


<IMG src="RedmondTrip2\lattesmall.JPG" <% if IE4Plus or NS6 Then %>style="float:right"<%Else%>align=right<%End If %> width=100 > The week before last I popped on over to Redmond to have a chat with the guys at Microsoft on the future of Visual C++, MFC, and the new .NET world. Instead of presenting a point list of what we can expect in the future, I wanted to give you guys a taste of what a visit to Redmond is like from a personal point of view.

Please be aware that this isn't an in-depth technical treatment of .NET - there are a million magazine articles and a ton of stuff on Microsoft's own site to get the basics. The .NET specific stuff presented here will mostly be new information that I wasn't aware of, and that I felt you guys would be interested in, or was simply a vague thought that came to me while slurping through tubs of Ben and Jerry's Fudge Chocolate Disaster ice cream.

A quick Thanks goes to Dundas Software and Microsoft for making this trip possible.

Part 5 - The Compilers

This was going to be a discussion on the libraries (namely MFC, WTL, ATL etc) but I wanted to talk a little bit more about the compiler.

Personally, I would hate to be working on the Visual C++ compiler. The guys who wrote the C# compiler must, I'm sure, wander around to the dark murky depths of the Visual C++ Compiler Developer's cage and lounge around and talk at length on how nice it is to be able to develop a compiler from scratch for a language that is so compiler friendly (well, compared to VC++). Because of the design of the C# language the C# compiler can process up to 3 million lines of code a minute. I'm also guessing there are no C# compliance hassles for the C# compiler team - though once ECMA gets through with the language there is, of course, no gaurantee that non-compliance may sneak in. A standard is merely a standard, and anyone who chooses to implement a compiler is free to change their implementation to whatever suits them (or their market) best.

This is the main problem with the Visual C++ compiler. It's up to something like its 13th incarnation, and each version is building on previous versions, with each new version being backwards compatible with those previous versions. So if someone, way back in version 2.0 made a bad call on a particular feature, then too bad - future generations are stuck with it or are forced to make horrible workarounds to cope with it. Fixing these non-compliance issues is often non-trivial but the guys at Microsoft are at pains to emphasise that when dealing with non-compliance they work at fixing the most used features first. Obviously there are economic (and time) considerations as well. Microsoft has in the past worked towards imposed deadlines (whether or not they ever met those deadlines is another story) and as the deadlines loomed certain features that were deemed, well, optional, were tossed overboard. They no longer want to work this way, and if it means release dates are strung out a little then that's the way it will be. The focus is on quality, not timeliness. Compliance was always on their minds but never as much as some would like, but they do recognise this and are trying to remedy the situation.

Let me digress and pose a question. Templates seem to be an area where religious fanaticism on compliance is particularly rife, but is this really an issue to most developers? Templates can certainly make life easier for a developer, but what about the developer who takes over the project when the original developer leaves? In the face of increased labor shortages is it really wise to be developing apps using specialised techniques for which you or your company will have serious problems finding developers who can maintain your code? Even if you do find such a developer, that person may charge a premium on their specialised services, and/or may cost more in the long run because of the extra time needed to get fully acquainted (and work) with the templatised code. Maybe I'm just a wuss and like taking the easy route to code writing, so I'd be interested in hearing your points of view.

<IMG src="RedmondTrip4\VisualCFlag.JPG" <% if IE4Plus or NS6 Then %>style="float:right;MARGIN: 10pt"<%Else%>align=right<%End If %> width=200 > I asked Ronald about the compiler internals and he said that the compiler gets full rewrites only occasionally. There was a rumour that the compiler code was so spaghetti-like in it's internals that no one - no one - wanted to touch the thing. He said it wasn't quite that bad. The last rewrite for the compiler was for Visual C++ version 4. Each version after this has had various revisions, additions, bug fixes, 'feature' additions (you guys know what I'm talking about) and maybe a #pragma or two to keep things interesting. All in all though, the versions of the C++ compiler we've had since Windows 95 development came into vogue are refinements on the original VC4 compiler.

As with each previous incarnation the latest Visual C++ compiler has even undergone further optimisation. Given that this is around the 13th review of the compiler, with each version gaining incremental, and smaller performance increases over the last version, it is amazing that they have tweaked a further 5% performance out of the compiler.

I've already mentioned some of the newest improvements to the Visual C++ compiler: a new crash recovery feature that allows an application to be restored to its state immediately prior to crashing allowing post mortems to be carried out; 'Edit and Continue' has been improved, and there is now public access to the debug info file

On top of these, there is also now a new /GL switch that allows the compiler to perform global optimisations across all files in a project instead of being confined to per-file optimisations. Given varying applications and files there is expected to be a gain of around 5%-10% speed increase in a typical app. Note that this switch is only a 'final-build' option, since it significantly increases compile time.

The compiler also (with the appropriate switch) now inserts buffer overrun checking code into apps that stops the possibility of buffer overrun attacks. This is a major source of attacks in applications such as internet applications and is the subject of many millions of dollars of investment by companies searching for solutions. By simply recompiling your app in VC7 (with said switch) your application will be protected. If you suspect buffer overruns may occur you can simply add your own buffer overrun event handler as a last-ditch 'I've tried everything' resort. Other problems such as the use of uninitialised variables are treated in a similar manner, and you can include your own handler in your code to take care of any uncaught instances of these.

Finally, there are new Processor Packs that you can add to the environment that allow you to target specific processors, such as Pentium III's, processors with 3D Now! etc. Gone are the days of convoluted inline assembly to target these cases. As more processors come out, more processor Packs will be distributed. Any thoughts on why Microsoft would be adding the ability to target different processors so easily? I'm sure they are just looking after us .

Next Instalment...

The Libraries.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Chris Maunder
Founder CodeProject
Canada Canada
Chris is the Co-founder, Administrator, Architect, Chief Editor and Shameless Hack who wrote and runs The Code Project. He's been programming since 1988 while pretending to be, in various guises, an astrophysicist, mathematician, physicist, hydrologist, geomorphologist, defence intelligence researcher and then, when all that got a bit rough on the nerves, a web developer. He is a Microsoft Visual C++ MVP both globally and for Canada locally.

His programming experience includes C/C++, C#, SQL, MFC, ASP, ASP.NET, and far, far too much FORTRAN. He has worked on PocketPCs, AIX mainframes, Sun workstations, and a CRAY YMP C90 behemoth but finds notebooks take up less desk space.

He dodges, he weaves, and he never gets enough sleep. He is kind to small animals.

Chris was born and bred in Australia but splits his time between Toronto and Melbourne, depending on the weather. For relaxation he is into road cycling, snowboarding, rock climbing, and storm chasing.

You may also be interested in...

Comments and Discussions

GeneralPlease come to pointtt tt t !!!! Pin
memberMOHAMMED AZGHAR HUSSAIN1-Dec-03 20:01 
QuestionWhy they said WTL is a mistake? Pin
wtl7-Feb-02 6:07
memberwtl7-Feb-02 6:07 
GeneralCompiler is not a black-box Pin
Feng Yuan ( 18:34
sussFeng Yuan ( 18:34 
GeneralRe: Compiler is not a black-box Pin
Jonathan Gilligan24-Oct-00 22:26
sussJonathan Gilligan24-Oct-00 22:26 
GeneralTemplates Pin
Ian Kilmister24-Oct-00 11:56
sussIan Kilmister24-Oct-00 11:56 
GeneralRe: Templates Pin
Walter Sullivan24-Oct-00 13:49
sussWalter Sullivan24-Oct-00 13:49 
GeneralRe: Templates Pin
Aza23-Jan-02 23:37
memberAza23-Jan-02 23:37 
GeneralC'mon Chris, you're better than that! Pin
William E. Kempf24-Oct-00 9:18
sussWilliam E. Kempf24-Oct-00 9:18 
GeneralRe: C'mon Chris, you're better than that! Pin
Chris Maunder24-Oct-00 9:51
sussChris Maunder24-Oct-00 9:51 
GeneralTemplate guys are so tense Pin
1-800-VALIUM24-Oct-00 9:59
suss1-800-VALIUM24-Oct-00 9:59 
GeneralRe: Template guys are so tense Pin
William E. Kempf25-Oct-00 4:15
sussWilliam E. Kempf25-Oct-00 4:15 
GeneralWhy I need better template support Pin
Jonathan Gilligan24-Oct-00 13:26
sussJonathan Gilligan24-Oct-00 13:26 
GeneralRe: Why I need better template support Pin
Twain Summerset24-Oct-00 21:38
sussTwain Summerset24-Oct-00 21:38 
GeneralWTL Pin
Christian Andersen25-Oct-00 2:41
sussChristian Andersen25-Oct-00 2:41 
GeneralRe: C'mon Chris, you're better than that! Pin
William E. Kempf25-Oct-00 4:05
sussWilliam E. Kempf25-Oct-00 4:05 
GeneralExample does not convince me. Pin
Sito Dekker24-Oct-00 10:53
sussSito Dekker24-Oct-00 10:53 
GeneralRe: Example does not convince me. Pin
Chris Maunder24-Oct-00 11:35
sussChris Maunder24-Oct-00 11:35 
GeneralRe: Example does not convince me. Pin
Walter Sullivan24-Oct-00 13:46
sussWalter Sullivan24-Oct-00 13:46 
GeneralRe: Example does not convince me. Pin
William E. Kempf26-Oct-00 3:36
sussWilliam E. Kempf26-Oct-00 3:36 
GeneralBoost? Pin
pUnk24-Oct-00 13:10
susspUnk24-Oct-00 13:10 
GeneralRe: Boost? Pin
William E. Kempf26-Oct-00 3:40
sussWilliam E. Kempf26-Oct-00 3:40 
GeneralRe: C'mon Chris, you're better than that! Pin
Daitya Rakshasa26-Oct-00 22:02
sussDaitya Rakshasa26-Oct-00 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170624.1 | Last Updated 24 Oct 2000
Article Copyright 2000 by Chris Maunder
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid