←back to thread

Why is Windows so slow?

(games.greggman.com)
337 points kristianp | 2 comments | | HN request time: 0.594s | source
Show context
shin_lao ◴[] No.3369174[source]
NTFS is a slower file system, that's probably the main reason why. Also console I/O is much better on Linux than Windows.

Our software builds everyday on FreeBSD, Linux and Windows on servers that are identical.

The windows build takes 14 minutes. The FreeBSD and Linux build take 10 minutes (they run at almost identical speed).

Check out is more than twice slower on Windows (we use git).

Debug build time is comparable 5 minutes for Windows, 4 minutes 35 on Linux.

Release build time is almost 7 minutes on Windows and half that on Linux.

VS compiles more slowly than gcc but overall it's a better compiler. It handles static variables better and is not super demanding about typenames like gcc is. Also gcc is extremely demanding in terms of memory. gcc is a 64-bit executable, Visual Studio is still a 32-bit execuable. We hope Microsoft will fix that in Visual Studio 2011.

Its easier to parallelize gmake than Visual Studio, which also explains the better Linux build time. Visual Studio has got some weird "double level" mulithreading which is eventually less efficient than just running the make steps in parallel as you go through your make file.

However our tests run at comparable speed on Linux and Windows and the Windows builds the archive ten times faster than Linux.

replies(2): >>3369184 #>>3369513 #
omellet ◴[] No.3369513[source]
There's a 64-bit version of the MSVC toolchain and MSBuild, so if you build outside of Visual Studio you won't be so constrained. This is how we do our builds here at work (a mix of C# and C++). We still edit code in VS, but local builds and continuous integration are done entirely using MSBuild. As of VS2010, C++ project files are MSBuild projects, and no longer need to use VCBuild.exe.
replies(2): >>3369525 #>>3369704 #
CurtHagenlocher ◴[] No.3369704[source]
I don't think this is true, at least for the C++ compiler. There's a 32-bit version producing 32-bit code, a 32-bit version producing 64-bit code and a 64-bit version producing 64-bit code.

Disclaimer: I work at Microsoft, but this is my hazy recollection rather than some kind of informed statement.

replies(1): >>3371374 #
omellet ◴[] No.3371374[source]
The %VSROOT%\VC\bin\amd64 is indeed a native x64 binary.
replies(1): >>3371969 #
1. CurtHagenlocher ◴[] No.3371969[source]
Yes, but it can only produce x64 code; it can't produce x86 code. Mind you, I'd love to be wrong about that...
replies(1): >>3373072 #
2. omellet ◴[] No.3373072[source]
Sorry, I didn't read your entire comment. The 64-bit linker can produce 32-bit code with /MACHINE:X86.