http://spl.haxial.net/weblog/index.php?p=85
Can somebody refute this jerk?
Quote:
|
AltiVec (a.k.a. Velocity Engine and VMX) is a steaming pile of doggy doo. It is a real pain in the ass to use, and usually a waste of time. It is more of a marketing gimmick than a real feature, or at least it is highly overrated. The only reason they added it was because Intel had already added the equivalent to their CPUs, and they did not want to look lacking in comparison (they did a me too!"). Yes, Intel had it first, it was called MMX (MultiMedia Extensions) and it was introduced in 1997. Yes, MMX is a steaming pile of doggy doo, but we are comparing doggy doo (MMX) with doggy doo (AltiVec) here. These days, MMX has been extended, and now it is called SSE and SSE2 (Streaming SIMD Extensions, where SIMD is Single Instruction, Multiple Data). Or you can say MMX refers to the original instructions, and SSE to the more recent ones, whatever, MMX and SSE are both SIMD, and it began in 1997 before AltiVec in 1999. Motorola obtained the general idea for AltiVec from Intel. However, Intel is more honest in their name for it they do not call it vector. Motorolas AltiVec name is misleading. The Vec is for vector, meaning a 1-dimensional array, but what is the maximum sized vector it can handle per instruction? A vector of 4 normal-sized integers or 2 normal-size floating-points! It is a technicality. True, 2 items can still be a vector, but practically speaking, it is just fugging ridiculous to call it vector when the maximum size of the vector is 2 items. 4 is little better. If you use so-called single precision floating-point values, these are half the size of the normal floating-point values, and then the maximum vector size is 4, which is still pathetic, and comes at the expensive of accuracy in the floating-point calculations. The lower accuracy of single precision FP is usually unacceptable for scientific purposes. It is acceptable for games, however games do not use it anyway because nearly all the hard yakka (work) is done by the separate GPU on the graphics card, not the CPU. It has also been acknowledged that AltiVec is not usually suitable for server-type programs such as a web server, and that not all code (in fact only certain types of code) can benefit from AltiVec. The bottom line is that AltiVec is NOT a vector processing unit, despite the name. It is a SIMD unit, and although it does have some benefits (which come at a cost), the benefits have been greatly exaggerated. What are these costs I mention? To use AltiVec, you cannot write normal C code, you are forced to write AltiVec-specific assembly code. Assembly is considerably more difficult to write than normal C code. Furthermore, assembly means that you lose portability, making it difficult to take your code to other CPUs or operating systems. And because AltiVec cannot handle vectors, to process a vector you must kludge it by calling the instruction repeatedly, processing 2 or 4 elements at a time, until the whole vector is done. This makes it difficult, awkward, and messy to program. Update: Actually, I just realized that I am not certain that AltiVec even supports normal-sized floating-point values. Possibly it only supports the single precision FP, which makes it even less useful. I cannot be bothered checking because either way, my point remains AltiVec is crappy. By the way, when I say normal-sized integers", that is 32-bit integers. When I say normal-sized floating-point", that is 64-bit (which is the size of the normal floating-point registers in PowerPC). One AltiVec instruction works on one 128-bit block, so 128/32 is where the maximum vector size of 4 is obtained (it is whatever you can fit in 128 bits). |
Can somebody refute this jerk?
