Skip to main content
GameDev.net gamedev.net
🔒 Locked

CPU Question

Started by lethalhamster Dec 2, 2004 at 1:15 PM 9 replies 800+ views
Original Post
lethalhamster
lethalhamster
Just wanted to know the differnce between CPUS. Mainly the AMD Athlon 2400+ (2.0Ghz) Pa(2.0Ghz) and a G5(2.0Ghz) Whats faster? I heard the G5 was the fastest, if they do make a difference in the speed your computer operates why are they all 2.0Ghz?
............Could Jesus microwave a burrito so hot that he himself could not eat it?
bakery2k1
bakery2k1
Time of execution = (number of instructions * average cycles per instruction) / clock speed

Thus 2 2GHz processors may take very different times to execute the same program.
lethalhamster
lethalhamster
Quote:
Original post by bakery2k1
Time of execution = (number of instructions * average cycles per instruction) / clock speed

Thus 2 2GHz processors may take very different times to execute the same program.


Oh. But... I had heard that a 1.2Ghz G4 does as many cycles as a 2.4Ghz P4... Is that because of like the whole difference in the OS and programs? Or is what I heard complete BS?
............Could Jesus microwave a burrito so hot that he himself could not eat it?
etothex
etothex
Quote:
Original post by lethalhamster
Quote:
Original post by bakery2k1
Time of execution = (number of instructions * average cycles per instruction) / clock speed

Thus 2 2GHz processors may take very different times to execute the same program.


Oh. But... I had heard that a 1.2Ghz G4 does as many cycles as a 2.4Ghz P4... Is that because of like the whole difference in the OS and programs? Or is what I heard complete BS?


No, the 2.4GHz P4 does exactly twice as many cycles as a 1.2GHz G4. Because _by definition_ Hz is a measure of cycles.

However, some processors take fewer clock cycles to do instructions, so that's why speed isn't always the same as clock.
jperalta
jperalta
Quote:
Original post by lethalhamster
Quote:
Original post by bakery2k1
Time of execution = (number of instructions * average cycles per instruction) / clock speed

Thus 2 2GHz processors may take very different times to execute the same program.


Oh. But... I had heard that a 1.2Ghz G4 does as many cycles as a 2.4Ghz P4... Is that because of like the whole difference in the OS and programs? Or is what I heard complete BS?


I'm not sure it's quite double the clock cycles, but the reason behind this conjecture is that whereas the x86 architecture has a 32-bit data bus the PowerMac architecture has a 128-bit data bus. So assume they're both using PC2700 (333 Mhz) DDR RAM you have the following statistics:

x86 = 333 * 32 = 10.6 GBps
PPC = 333 * 128 = 42.6 GBps

Also, due to the fact that the CPU can perform prefetches on data and instruction prediction it can perform four times the number of operations per second as an x86 processor (on 32-bit data), however this is really only useful in cases where you're iterating over large amounts of data, otherwise you're just prefetching data and operating on data that you're not going to use anyways. So, in theory, the PPC is actually about 4 times as fast as an equivilent x86 processor, however this can't be taken advantage of as often as you'd like.

Also... to compare FSB speeds:
x86 = 200 * 32 = 6.4 GBps
PPC = 167 * 64 = 10.6 GBps

So, while not even twice as fast at getting data to the processor, it is still considerably faster.
vNistelrooy
vNistelrooy
Quote:
Original post by jperalta
I'm not sure it's quite double the clock cycles, but the reason behind this conjecture is that whereas the x86 architecture has a 32-bit data bus the PowerMac architecture has a 128-bit data bus. So assume they're both using PC2700 (333 Mhz) DDR RAM you have the following statistics:

x86 = 333 * 32 = 10.6 GBps
PPC = 333 * 128 = 42.6 GBps

Also, due to the fact that the CPU can perform prefetches on data and instruction prediction it can perform four times the number of operations per second as an x86 processor (on 32-bit data), however this is really only useful in cases where you're iterating over large amounts of data, otherwise you're just prefetching data and operating on data that you're not going to use anyways. So, in theory, the PPC is actually about 4 times as fast as an equivilent x86 processor, however this can't be taken advantage of as often as you'd like.

Also... to compare FSB speeds:
x86 = 200 * 32 = 6.4 GBps
PPC = 167 * 64 = 10.6 GBps

So, while not even twice as fast at getting data to the processor, it is still considerably faster.


WTF? 333Mhz * 32bit = 10.6 GByte per sec?? You should have divided that by 8, and the memory bus is actually 64-bit, or dual-channel 64-bit (128-bit). The same goes for the FSB. It is 64-bit, and it is not 200Mhz but quad-pumped 200Mhz (800Mhz), therefore 800 * 64 / 8 = 6.4 GBps.
This however, isn't what is gonna make a CPU really faster than another CPU. The Athlon has a much shorter pipeline (12-stages) than the P4 (20-stages, or 30 in the Prescott). Therefore mispredicted code branches, for example, cost the P4 much more compared to the Athlon. This is just an example, do an interenet research about the architecture differences.
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
jdhardy
jdhardy
For the best explanation of why P4s are the way they are, read the 'blackpapers' over at Ars Technica.

I would suggest reading about "Pipelining" (Part 1, Part 2) and then "An Architectural History of the World's Most Famous Desktop Processor" (Part 1, Part 2). That should give you a pretty good background on why higher clockspeed != higher performance.

There's a lot more there that's worth a good read. Ars is one of my favorite sites.
Adraeus
Adraeus
An AMD 2400+ is equivalent to an Intel 2.4Ghz. Nifty naming scheme, eh?
Spoonbender
Spoonbender
Original post by jperalta
Quote:
Original post by lethalhamster
Quote:
Original post by bakery2k1
Time of execution = (number of instructions * average cycles per instruction) / clock speed

Thus 2 2GHz processors may take very different times to execute the same program.


Oh. But... I had heard that a 1.2Ghz G4 does as many cycles as a 2.4Ghz P4... Is that because of like the whole difference in the OS and programs? Or is what I heard complete BS?


The Ghz is just the number of clock cycles per second. So any 1.2GHz cpu will run 1.2 billion cycles per second, by definition.

The important thing is that they might get a different amount of work done in each cycle. They might spend different amounts of cycles waiting for data, or they might just be able to execute instructions in fewer cycles.

An Athlon 2400+ is roughly equivalent to a P4 2.4ghz, depending on the apps you test it in.
Not sure about the G5, but it's supposed to be pretty efficient as well.

The short version is that an Athlon can get a lot more work done in each cycle than a P4 can. The long version is all the links JHardy provided :)
lethalhamster
lethalhamster
Thanks everyone. [smile]
............Could Jesus microwave a burrito so hot that he himself could not eat it?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.