Re: MSVC 7.1 Compile Time Slowdown

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Andre Kaufmann (_NO_SPAM_andre.kaufmann_ad_t-online._xxx_de)
Date: 09/14/04

  • Next message: Mike Hall: "Re: MSVC 7.1 Compile Time Slowdown"
    Date: Tue, 14 Sep 2004 20:55:56 +0200
    
    

    "Mike Hall" <mjh@nospam.nospam> wrote in message news:eZ3WRWbmEHA.3872@TK2MSFTNGP09.phx.gbl...
    > Hi. I have recently migrated some of my code to use the new 7.1 Visual
    > C++ compiler, and noticed some dramatically longer compile times. The
    > greatest increase in time seems to be between code compiled with /O1
    > under MSVC 6.0 and MSVC 7.1. If I turn off global optimizations (i.e.:
    > /Og-) only then my compile times drop down dramatically, but at the cost

    When you are using global optimizations the linker effectively "compiles" the code,
    the compiler will generate "preparsed" intermediate code.
    I donīt know it for sure, but it seems that the "linker" is doing something like a full
    re-build - even if only code in a cpp file has been changed.

    But since global optimizations are "global", that makes sense.
    Many unnecessary function calls and code may be eliminated,
    because the linker has information about the whole code and not
    only about the included code and does code inlining at the linker stage.

    The downside is that compilation needs more time (!full build!).
    I would recommend global optimization only for release builds,
    and during development debug or release builds without
    global optimization turned on.

    I wonder why you experience such a high difference in code size,
    o.k. global optimization reduces significantly code size, but i didnīt experience
    such a high difference.

    Andre


  • Next message: Mike Hall: "Re: MSVC 7.1 Compile Time Slowdown"

    Relevant Pages

    • LNK2001 Unresolved external symbol
      ... I have a backup of my project that compiles and links OK ... Any offers of help would be appreciated, here's some of the linker ... "\Ti2000\Liberator Wont ... external symbol "public: virtual int __thiscall ...
      (microsoft.public.dotnet.languages.vc)
    • Re: .EXE -> .ASM -> .EXE
      ... passing the '-static' and '-static-libgcc' linker ... object modules, a size of 437 kB still seems inordinately large. ... This is most likely a source organization problem. ... library for example is organized so that each function compiles to a ...
      (alt.lang.asm)
    • newbie linking IoXxx routines problem
      ... While writing a small test driver from ... linker cannot find IoCreateSymbolicLink ... while it compiles and links perfectly if the call to IoWriteErrorLogEntry is ...
      (microsoft.public.development.device.drivers)
    • Re: WSAStartup()
      ... I added ws2.lib as an Additional Dependency for the linker and all now ... compiles, links and runs on my eBox fine, even though it does nothing). ... unresolved external symbol _WSAStartup referenced ...
      (microsoft.public.windowsce.platbuilder)