Slow compilation time on linux?

N

none

I have a fairly large C++ template application that include a large number of header files from the
itk library. CMake is use to generate makefiles.

But when I run 'make' it takes around a minute or more to compile the application (the final
executable is around 6 MB) on Ubuntu 9.10 on a 3 GHz Intel Core 2 Duo 8400 CPU and 6 GB RAM.

When I compile the same program (using the same CMakeFile) in windows vista using Visual Studio 2008
it takes under ½ the time (approx 20 sec.).

Any ideas why its faster to compile on windows (do the visual studio compiler use some optimizations)?

When the build is made using CMake 'release' is choosen for both the linux build and the windows build.
 
J

Jorgen Grahn

Some tools are better than others, it has always been like that and will
always be like that. Do you have a C++ language question?

Or more specifically: it's not very surprising that one compiler
processes heavy templates at twice the speed compared to another.

The speed of the file system is also a factor. You didn't say if it
was local in both cases.

/Jorgen
 
J

Juha Nieminen

none said:
Any ideas why its faster to compile on windows (do the visual studio compiler use some optimizations)?

gcc is notorious for being a slow compiler (one of the most common
complaints about it, especially from people who need to compile humongous
projects).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,961
Messages
2,570,131
Members
46,689
Latest member
liammiller

Latest Threads

Top