views:

99

answers:

3

I compiled an 64bit binary of ioquake3 and an SDL binary to go along with it and I noticed on Windows 7 64bit, operation, while relatively stable, it doesn't have top notch performance.

An equivalent binary on 64bit Debian, runs definitely faster, and perfectly stable.

And I'm thinking: with all the major manufacturers still dispatching 32bit binaries predominately - major exception I can think of is Autodesk's Autocad - is Windows still immature on its 64bit libraries?

+1  A: 

While Windows is slowly making strides towards 64-bitness, one could easily say that Linux has a massive, perhaps even crushing, advantage due to the wide variety of platforms that it has been made to work on. Issues that Windows developers are only coming across now have been long solved under Linux (although of course there are Linux developers who choose to ignore these solutions; their code tends to be brittle, and sometimes non-portable).

Ignacio Vazquez-Abrams
+1, in spite of the fact VC8 had a /Wp64 flag...
Ninefingers
That's not the case here. There is no difference in optimizing for x64 between Linux and Windows. If the C code itself is performing well on Linux x64 it should do so on Windows x64 aswell. The only reason I could imagine is, that GCC optimizes better for x64 than VC++. But I doubt it.
Axel Gneiting
It could be that there are problems in another part of the pipeline. Heck, it could even be SDL itself.
Ignacio Vazquez-Abrams
I also doubt that SDL is the cause, because for ioquake3 that's only responsible for I/O and setting up the viewport. All performance critical API calls are done via OpenGL. But the OpenGL drivers should be unified for 32 bit and 64 bit aswell.
Axel Gneiting
It's hard to compare the systems, because we don't know what else is running on the win vs debian boxes (i.e. is win running some service consuming lots of cpu resource) and we don't know the intricacies of the win scheduler, so we don't know if one is more efficient for one type of process than another. I have always thought Linux is faster in all things, but then I'm just biased!
Ninefingers
Windows 3D game performance should be at least as good as on Linux. The last time I checked Doom 3 and ETQW ran noticable slower on Linux.It's just a driver thing, but nonetheless no big surprise. Windows is the market where all the game benchmarks are run, so the drivers on it are much more optimized - even specifically for a single game, if it is an AAA title.
Axel Gneiting
+2  A: 

I would answer no. 64-bit support in the operating system has been around since Windows XP was released in 64-bit edition, although pre-vista drivers and 3rd-party software were very much experimental. Windows is a fully capable 64-bit operating system.

However, you have to remember that Microsoft's success is built on the fact Windows runs pretty well on any x86 based processor with any other combination of hardware, thanks to HAL. When 64-bit XP first came out drivers were scare in their 64-bit form until traction was gained. As you've observed, most manufacturers still develop 32-bit applications only for Windows; Visual Studio and Microsoft Office proof that it is not only 3rd-party vendors. Why? Ease. Take a walk around any pc-shop and you'll hear all sorts of praise about 64-bit cpus in todays modern laptops but what you'll actually find is that their OSes are shipped 32-bit. It's a standard and it works on 32-bit.

Linux, by contrast, has always been a programmer's platform. Most distributions support at least i386 and "x86-64"; some support ppc architectures. The kernel can be built upon just about every chipset known to man. Why? Linux isn't constrained by needing commercial product stability to survive and is often a researcher's platform. Not only that, but even if the core devs had no interest in porting it, you could. Much of the rest of the gnu system is written for portability so it's trivial to compile elsewhere. And not writing your code in a portable manner isn't considered good etiquette.

Take a look at Flash support in linux - 64-bit alpha. Even Mozilla provide 32-bit only builds although they allow distributors to build official 64-bit versions. Skype is 32-bit only.

Basically, many software developers don't need to support 64-bit yet, or don't see it that way at least. As such, I'd say both operating systems are mature - the eco system around them is what is different.

Ninefingers
Ease isn't the only reason, I'd note that dependencies that are register dependent (Visual Studio as an example) would all break if they switched, even more so than the version upgrade itself. They don't want to anger the vendors and break all add-ons at once, forcing all those companies onto 64 bit versions, or more likely, to support 2 different versions of their add-ons.
Nick Craver
True. I've seen code that does all sorts of ugly things based on the fact pointers are 32-bit in length, too. Mostly, it's easy to port, with the exception of assembly and things like that. Does make me wonder what their source looks like...
Ninefingers
+1  A: 

Define "relatively stable"?

All Windows API calls end up in the to the same 64 bit functions if you are running a x64 bit Windows, so there is no stability difference at all.

You should profile. Most certainly something inside the user space application is causing the performance degregation, not the kernel.

Are you sure that you are running the same optimization level when compiling the 64 bit binary? And what compiler did you use?

Axel Gneiting