1:06 PM - PowerPC.. why a mac can emulate a PC
I learned some more about the PowerPC chip today. It seems that the PowerPC prior to the G5 had a feature that allowed it to switch between endian modes IN the processor 5 times faster than doing it in memory with bit shifts.
I also found out that the Altivec Instructions fixed the biggest flaw with the PowerPC. It seems the G3 and lower were very slow when converting between integer and float.. so if you cast an int as a float in your code like this
float y;
int x;
y = (float)x;
it would really slow down the app. Altivec has instructions for doing this really quick.
The reason its slow on G3 is because the floating point and integer stuff is seperate in the chip (RISC) and had to go between memory to function on the chip.
location: Home