December 16
Ok, so I haven't updated my blog in a while, and I needed a topic. So this is it.
Now, granted, I *was* going to write about quaternions and their use in 3D graphics and how handy they are. But I'm going to save that topic for another time because I'm looking at some old code using quaternions and frankly speaking I just don't know how the @!^&$ it worked before. I mean it shouldn't...
So, 64 bits. There are a lot of myths about 64 bits. So what are some of the advantages of using a 64-bit OS?
- Increased overall memory capacity. Today's operating systems (OSes) are limited to 4 gigabytes of physical RAM. This is a processor limitation, not an OS limitation. The reason we say '32-bits' or '64-bits' for OSes is the actual physical count of 'address' lines on the hardware address bus. So, if you have 32 individual address lines, you can address up to 2^32 individual memory locations. That comes out to: 4,294,967,296 bytes of memory, or 4 gigabytes (4GB).
Theoretically, a 64-bit OS can address up to 2^64 bytes of memory. That's 18,446,744,073,709,551,616 bytes of memory, or ummm well a hell of a lot of memory which I assure you at 2007 prices would be quite expensive. :) I'm not even sure that amount of RAM exists. Anyway, you can see why 64-bit OSes will be around for a while. I won't be alive when 128 bit OSes become necessary.
You might think that 4GB is a lot and that OSes are so bloated now and Microsoft is just producing bloated code, blah blah blah... (insert more whines here and evil Microsoft monopoly comments and how people are forced to use Windows, etc. etc.)
The facts are quite different. Just take a standard high resolution image from a camera these days. An image can easily take up megabytes of memory, and a video can take up 100's of megabytes or gigabytes. Video editing applications, photo editing applications and the like require enormous amounts of RAM just to function smoothly. You complain that Vista requires a gigabyte of RAM just to function? Consider that Vista is doing many things in the background. *One* application that edits photos or videos can easily require more than one gigabyte to function smoothly. Anyway, I've digressed :)
Oh, and if you are thinking "Well Linux takes up just x amount of RAM to function, therefore Vista is bloated"... well, consider my CALCULATOR takes less than a megabyte of RAM and boots up INSTANTLY. That does NOT mean my calculator is more functional that Vista simply because it uses less RAM and boots up faster. 'Nuff said.
Some 32 bit OSes deal with this 4GB limitation better than others. But the bottom line is, if you put 4 gigabytes in your computer, you will only be able to use anywhere from 2GB-4GB of this.
Using 64-bit Vista Ultimate, you can use 128+ gigabytes of memory. This should be future proof for a while :) I say '128+' because as 128 gigabytes becomes the norm, Microsoft can easily increase this limit up to the physical limitations of a 64-bit processor (2^64 bytes - see above).
- Increased memory for applications (processes).
Did you know that each application on a 32-bit Windows OS can access a MAXIMUM of only 2 gigabytes of memory no matter how much memory you have installed on your computer?
With a 64-bit OS, this limitation is no longer present. Serious server applications and games will really benefit from being able to access more memory. For example, "Supreme Commander" uses upwards of 4 gigabytes on large skirmish maps... a 64-bit OS is becoming a necessity for gamers.
Photo and video editing applications can now request as much memory as they need. There are tons of other examples, but this blog listing will be a book by the time I'm finished.
- Performance increases.
Yes, it's true. 64-bit applications for the most part will run FASTER than 32-bit applications on the same hardware.
Want a 5-20% increase in performance? Install a 64-bit OS.
What's the reason for this? Well, here are a few: - More internal 'registers' on the CPU allows the code to be smaller, lighter, and faster using the internal CPU registers instead of accessing physical memory (very very slow), or cache memory (somewhat slow).
- Guaranteed access to SSE(2) and other stuff. Compilers 'know' that if you are compiling to 64-bit, then the processor will have minimum capabilities. One of these is SSE which allows super fast floating point operations. This benefits scientific applications, anything that does calculations (spreadsheets), 3D code and games :) And a LOT more.
- Microsoft has changed the way that functions in code are called now. Before, 'arguments' to functions were passed on the stack. 64-bit code passes the first three arguments using CPU registers (see #1) - so code that calls lots of functions benefits tremendously. It takes less memory and less execution time to call functions in 64-bit code now.
This post is way too long now. I'm going to leave you with some thoughts. I've been using Vista Ultimate 64-bit version for about 6 months now and have not encountered any piece of new hardware or application that doesn't function just fine on 64-bit Vista. In fact, you won't even be able to tell you are running 64-bits... everything looks and feels *exactly* the same. The only difference is that things may perform a bit faster... :)
Why not try it out? If you buy Vista Ultimate, you get *two* DVDs in the box; one 32-bit DVD and one 64-bit DVD. You can try out the 64-bit first (you do NOT need to enter a serial number or activate any version of Vista for an entire month). So give the 64-bit version a try... you can always go 'back' to the 32-bit version of for some reason the 64-bit version doesn't work out.
Finally, I've been writing a game engine for a while now, and when I compile to 64-bits (I don't need to change any code!), the 64-bit version is running about 20% faster. Amazing considering I didn't have to change anything. I just get a 20% performance increase simply by running 64-bit Vista.
Keep in mind that you need a 64-bit processor :) Most computers sold today have 64-bit capability.
There are actually a lot more benefits specific to 64-bit Vista. Most of these center on security. But that's a different topic.
Hope you learned something, this blog entry is definitely not complete with regards to the benefits of using a 64-bit OS.
-Todd