Why is Linux faster than Windows (when compiling)

Discussion about official Mozilla Firefox builds
Post Reply
User avatar
nilson
Posts: 4100
Joined: February 15th, 2003, 11:55 pm
Location: Tuscaloosa, Alabama
Contact:

Why is Linux faster than Windows (when compiling)

Post by nilson »

When I compile Mozilla Firebird in Linux, it takes about 45 minutes (a complete guess; I haven't even compared build time to a clock). This is when using GCC 3.2.3 (I think... not with my desktop atm)

When compiling on Windows, using the latest versions of the MinGW and Cygwin ports of the GNU tools, it takes somewhere aroung two hours, on the same machine... Why?

Are the Cygwin/MinGW ports just plain slow or is there something bigger going on?

One thing I've noted though, is that on Windows, my CPU usage will not rise over 50% (from compiling; other things may effect this)

If it does matter at all (or maybe I just like to show off... who knows ;)), my machine specs are as follows:

2.6 GHz P4 w/ hyperthreading,
1024 MB PC2700 DDR ram,
120 GB 7800 RPM (Windows) 80 GB 7800 RPM (Linux)


OSes in question:
Windows XP
Mandrake 9.2
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

Using MSVC6 on Windows XP it takes about 45mins-1hr for a clean build, so maybe it is a MinGW problem, my specs are very similar to yours.

Athlon XP 2500+ (2GHz)
1024MB PC2100 DDR RAM
120 GB 7800 RPM
Safrax
Posts: 11
Joined: October 26th, 2003, 3:46 pm

Re: Why is Linux faster than Windows (when compiling)

Post by Safrax »

nilson wrote:Are the Cygwin/MinGW ports just plain slow or is there something bigger going on?


P4's in general seem slower at compiling to me. But the real issue here is that linux to windows ports are slower. I'm not sure why but I believe cygwin and the like emulates linux api calls and translates them to windows api calls. Emulation is almost always slower.
User avatar
redmars
Posts: 13
Joined: December 14th, 2003, 10:51 am

Re: Why is Linux faster than Windows (when compiling)

Post by redmars »

Safrax wrote:I'm not sure why but I believe cygwin and the like emulates linux api calls and translates them to windows api calls. Emulation is almost always slower.
I'm pretty sure that's rubbish. What might be an issue is that piping support is better on Linux/bash than on Windows. GCC can use this to avoid creating intermediary files while compiling.
Post Reply