Re: VC++ Compiler multithreading

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"David Wilkinson" <no-reply@xxxxxxxxxxxx> wrote...
Harry Reid wrote:

Is VC++ compiler itself utilize multithreading ?

Because my friend said that his computer "stops" when VC++ is in the
process of linking ...

Is it true that single core process will be better in this case to speed
up the compiling and linking process of VC++ compiler ?

Harry:

You can be sure that all versions of VC++ utilize multiple threads in one
way or another, even on a single CPU machine.

But VS2005 can divide the compilation itself into multiple threads on a
multi-CPU machine. This should make the compilation faster. Why do you say
slower?

During compilation, each individual file is compiled quickly, so you see
activity. The link step does not show incremental progress, so the machine
will appear to "hesitate". This is normal. Unless your friend is seeing
something beyond what I normally observe.

Isn't it the case that VS only distributes a whole solution build across
multiple CPUs/cores? That is, a solution with two projects will build both
at the same time. However the individual files will all build within the
same blocking thread, and hence a solution with a single project doesn't
benefit from this at all. I understood it was a common complaint levelled at
VS2005, that the compiler/project build manager was not efficient across
multiple cores?

Anyway the OP seems to be talking about the linker here specifically. It
certainly has a big impact on my (single-core) machine when linking large
projects, both CPU and HDD activity-wise, and especially when using LTCG.
I've not heard anyone suggest the linker itself has been optimised for
multiple cores yet. One way to tell is to check the Task Manager graphs I
suppose.

--
Andy


.



Relevant Pages

  • Re: namespaces and main()
    ... having multiple definitions is ... Actually it's quite a big problem for the linker to sort out - some ... translation unit and not compile it in any of the others. ... One way around the bloat issue is just to have a single compilation ...
    (comp.lang.cpp)
  • Re: Hard-coding compile date/options
    ... include in the executable the compile date and the compiler options ... multiple object files in a single program can potentially occur at ... track the compilation data of individual object files; ...
    (comp.lang.fortran)
  • Re: Preprocessing with gcc -E
    ... compile source files in any order. ... to evaluate however consists of multiple compilation units. ... I would expect to get some error of type "multiple definition of" ...
    (comp.programming)
  • "sched: add vslice" causes horrible interactivity under load
    ... with 2.6.23.x I could have multiple "make -j3" compilation runs going ... in the background with no real problems, ... I did a git bisect starting from 9b73e76f3cf63379dcf45fcd4f112f5812418d0a ...
    (Linux-Kernel)
  • Re: GPL vs non-GPL device drivers
    ... GNU/FSF claim that dynamically linking a work with, say, the readline ... mechanical process such as compilation or linking *cannot* create a ... And you must show them these terms so they know their rights." ...
    (Linux-Kernel)