by Dan East » Jan 28, 2001 @ 9:41pm
Well, one of the misconceptions about data-width is that more is always better or faster (32 bit processors are faster than 16 bit, etc). 32 bits (IMO), is the magic number. A 32 bit processor can handle a numerical value large enough to be useful for most real-world applications. There are cases when binary operations (AND, OR, shifting, etc) could be performed on a 64 bit value, where with a 32 bit processor two steps would be required. But in most cases the programmer does not need to handle numbers larger / smaller / with more precision than what can be stored in 32 bits.<br>Further, unless a specific attempt was made to optimize the code by using 64 bit values whenever posible then no improvement will probably be seen running the applicatin on a 64 bit processor.<br>Floating point emulation should be no faster on a 64 bit processor. Again, it is all about ranges. If the programmer is not working with values beyond what can be handled in 32 bits, then no improvement should be seen with the 64 bit processor.<br>It all comes down to this: say I can only add numbers if they are less than 10, but you can add numbers if they are less than 100. Say you and I were in a race, and the question was, who can add the numbers 3 and 4 together faster? My limit of 10 would have no impact, so I would not be handicapped (if we were running at the same clock speed we would tie). However, if asked to add 25 and 30, then I would have to cleverly use several steps within my range to accomplish what you can do with one single step, thus you would win. My point is that programmers seldom need to deal with values larger than 32 bits (which can store a signed integer between -2,147,483,648 to 2,147,483,647), so the ability of a 64 bit processor to handle the larger values in one step is not realized often. Again, when talking about binary operations, 64 bit processors can make a difference, but binary operations are not usually performed on floating point numbers.<br><br>I agree completely with Christian about Microsoft's MIPS compiler. I have had to try to bend over backwards to code in such a way that data is aligned on 16 bytes, otherwise the MIPS processor runs several times slower. The compiler should handle that automatically. That is a big advantage of the ARM processor - it is happy as long as data is even-byte aligned.<br><br>Dan East