Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7509095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:48:19+00:00 2026-05-29T22:48:19+00:00

Is there an online resource describing the changes in the code generation of VC10

  • 0

Is there an online resource describing the changes in the code generation of VC10 compared to VC9 ?

I’m not talking about c++0x and other nice features (such as built-in static_assert), neither the refined UI. What I need to know is how the generated code is expected to be different, due to optimizations, changes in structure member alignment and etc.

P.S. It’s a MSVC 2010 express, for Win32

EDIT

I’ve built several projects using VC10, so now I have some comparison data. Overall I see a significant executable image size increase, about 15% compared to VC9, and 10% even compared to VC8.

I’m optimizing for speed, not for image size. So that strictly speaking that comparison is not fair. However I remember that VC9 compared to VC8 usually produced a bit smaller images, yet managed to squeeze even more performance. From the performance point of view the new code is pretty close to that of VC9 (indistinguishable in my tests).

Besides the code quality degradation (which I hope is not the case) I see the following potential reasons for larger images:

  • More aggressive overall speed optimizations (which lead to an only modest effect, at least in my case), such as aggressive loop unrolling and etc.
  • Additional data in the image due to some new features (such as SAFESEH, DEP and etc.)
  • Larger runtime libraries for whatever reasons (I’m using them as a static lib, linked into the executable)

Disabling the SAFESEH option (which is now on by default) decreases the image slightly (1%).

Any more ideas? May this be different if I use non-express version of VC10?
Does enabling DEP (data execution prevention) enlarge the image size? (I guess – no)

I’m compiling with /EHa, this reduces optimization strength, but this is also the case with older VC versions.

EDIT 2

I’ve found the causes of the image bloating.

Using dumpbin I’ve discovered that surprisingly the EXE built by VC10 contains a relocation table. This was weird, since EXEs don’t usually contain it. And it disappears if the EXE was built with the following in the vcxproj file:

<Link>
  <RandomizedBaseAddress>false</RandomizedBaseAddress>
</Link>

By default base address randomization is ON in VC10. This option mysteriously makes VC10’s linker behave “as it builds a DLL”, as the result it includes the relocation table.

This reduced the EXE size, but still not to the level of VC9. Then I’ve opened the EXE with dependencies walker, and discovered that the EXE built by VC10 imports EncodePointer and DecodePointer from kernel32.dll.

According to online resources, those functions are imported by the VC10 runtime libraries, by yet another idiotic naive attempt to enhance the software “security”. Not only the new runtime seems fatter, but this would also prevent the executable from running under Win2K and WinXP-SP1.

Fortunately there’s an option to fallback to the older runtime libraries:

<PlatformToolset>v90</PlatformToolset>

After it was set – the produced EXE became almost identical to the one built by VC9, including size, import table, sections, safe exception handler table, resources and etc.

So that now it’s possible to benefit from some of the new features, without sacrificing the code quality.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:48:21+00:00Added an answer on May 29, 2026 at 10:48 pm

    This might help you out a bit. Unfortunately it might not be detailed enough (depending how much detail your looking for).

    http://blogs.msdn.com/b/vcblog/archive/2009/11/02/visual-c-code-generation-in-visual-studio-2010.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any online complier/interpreter to execute code for php 5.3? like there is
I searched online for awhile about what is Excessive resource usage on SQL Azure,
Can anyone out there recommend a good online resource for CSS 'design patterns'? I
Does anyone know a good online resource for example of R code? The programs
Is there an online resource or database that allows looking up the C# equivalent
Is there an online resource that shows how to write a simple (but robust)
Is there any free online resource explaining how to encode those barcodes?
Are there any online resources which show the basic steps to access the Microsoft
I was wondering if there was any resources available online that explains what happens
Is there any online utility to convert jquery syntax to mootools syntax? Is there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.