The Hardware Helper has been getting a good deal of e-mail. And a lot of those e-mails contain questions, conjecture, derision, praise, and speculation about the new G4 processor. While I have answered most of those questions, all of this mail does bring to light the need for more information on this subject. If you have been looking to buy a new G4 system, upgrade your current system to a G4 (see also ”
How to Buy G4 Upgrade Cards
“), own a G4, or are just curious about the G4 processor, read on.
How Many Roads Must a Chip Walk Down?
The G4 is the latest PowerPC microprocessor, developed by Motorola with input from Apple. It has been in development for about two years, and hit the streets in mid-October 1999. It was supposed to be produced at 400MHz, 450MHz, and 500MHz speeds, but, due to production problems at Motorola, it instead shipped at 350MHz, 400MHz, and 450MHz speeds. That was why Apple had to delay shipping its G4 Power Macs, and also why Apple had to quickly
knock 50MHz off of every item in its G4 product line
last fall. Happily, everything is cleared up now. Apple is selling G4s, the speeds are back up, and Motorola has production of this chip down pat.
The G4 operates similarly to the G3. The FPU (
Floating Point Unit,
the execution unit on the chip that handles sophisticated math computations) is more powerful on a G4 than on a G3, but the general processor is about the same. In fact, the G4 was designed with the premise that changes to the G3 architecture only be made if they produce multiprocessing or multimedia performance gains on the G4. There are other hardware tweaks on the G4 besides the faster FPU — the memory management unit (MMU) has been improved to support more physical RAM as well as up to a 2MB L2 cache.
However, the big difference between the G4 and the G3 is the addition of a 128-bit
vector execution unit
and the necessary on-chip hardware to control it and its new instructions. It’s the technology Apple calls Velocity Engine, though Motorola prefers to call it AltiVec.
The big speed gain the G4 architecture provides comes from AltiVec. This addition to the standard PowerPC architecture means the G4 isn’t just processing data
but in a completely different fashion than the G3. Essentially, the G4 can work on several portions of data simultaneously — 128 bits of data can be chopped up into sixteen 8-bit blocks, eight 16-bit blocks, or four 32-bit blocks.
AltiVec can provide significant benefits for solving certain kinds of problems. For example, a G4 using AltiVec technology can render 2D and 3D graphics many times faster than a G3. AltiVec can also encode sound, manipulate audio data, and handle high-end encryption algorithms faster than its predecessor.
There’s a catch, however. In a situation similar to the one when the Mac made the transition from the 680×0 processor to the PowerPC, your software must be modified to take advantage of AltiVec/Velocity Engine to take advantage of this new power. If your software doesn’t work with AltiVec, it’ll run the same as it would’ve on a stock G3 of the same speed.
Want to know if the programs you use have been modified to take advantage of AltiVec? The Hardware Helper has compiled a
list of the applications
that he and a few of his esteemed and august colleagues here at
have found out are optimized for the G4.
AltiVec at Work
To see the benefit of having the G4 use AltiVec to process certain instructions more efficiently, let’s consider a tiny real-world problem: I have to turn eight pixels on my screen from red to blue.
On a G3, the processor loads the data for the location of one pixel into memory. Then it does the math to change that pixel to blue. The G3 then retires that pixel and starts on the next one. On a G4 with AltiVec, the processor could queue the data for each pixel in one of the eight 16-bit data blocks that AltiVec can handle. Then the G4 would apply the change to all eight sets of pixel data at once, turning them all blue in one step. The G4 would then retire all of that data and move on to its next task.
That sort of parallel processing allows the G4 to process data in larger chunks. However, these instructions are most useful for multimedia applications, encryption, and the like. There’s a reason why Photoshop was the first application optimized for the G4 — it can receive a big benefit from supporting AltiVec.
The next question is, why can’t
take advantage of AltiVec? Why didn’t Motorola make AltiVec even more complex, so that it would work with an even wider range of applications?
G4s at RISC
The G4, like all members of the PowerPC family, is a RISC (Reduced Instruction Set Computer) processor. There’s another class of chips called CISC (Complex Instruction Set Computer) processors. The Pentium, for example, is a CISC processor. A CISC processor has a large, complex set of instructions that the processor can execute, whereas a RISC processor has a small set of simple, fast instructions.
The idea behind RISC is that a if you reduce the number of instructions a processor understands, the remaining instructions can be run much more efficiently. Since most processors are performing a few tasks all the time and other tasks quite rarely, you can get a big performance boost by removing those rarely-used instructions. While it’ll now take several steps for the processor to perform those tasks, they’re used so rarely that the benefit of streamlining the most common instructions outweighs the loss of speed in the complicated instructions.
Processors can execute millions of instructions per second. That’s what the megahertz speed rating of a processor is all about: all 400MHz processors complete 400 million cycles a second. However, that 400MHz processor isn’t necessarily completing 400 million instructions a second. There are times when the processor sits, idly waiting for data to arrive from the hard drive or RAM. Additionally, the processor sometimes takes more than one cycle to complete an instruction.
Adding AltiVec instructions to the G4 makes the chip a bit more complicated — so AltiVec has been carefully designed so that the RISC instruction set remains as small and streamlined as possible. Too many complex instructions defeats the general goals of RISC architecture.
It’s important to note that neither RISC nor CISC is an inherently better scheme. They both have their advantages and disadvantages. It is entirely possible that a change in technology will make CISC processors a better choice. However, in terms of today’s technology, RISC does appear to be more efficient. That is why the G3 and G4 can outperform Intel and AMD chips that have higher clock speeds.
The Last Word
The G4 is much faster than the G3 for applications that have been optimized to take advantage of it. But not all applications can take full advantage. The G4 does best with multimedia, and those are generally the applications that have been optimized. There are parts of any application that may be able to use AltiVec, but right now only the applications that can take the most advantage of it have been optimized. Before you look at a G4 machine — or especially a G4 upgrade — understand what tasks you usually perform and consider if you won’t be better served by a fast G3.
If you ultimately decide you’re simply suffering from G4 envy, go ahead and acknowledge it. Then, safe in the knowledge that it’s the reason you’re buying a G4, get out your credit card.
Macworld.com editorial assistant DAVID READ (
) dons his black cape at night to become the
Hardware Helper. In daylight hours he covers business software and system hardware for Macworld.