@ Soleron, If I do not understand how a CPU works, please tell me how they work. I would honestly like to know. Nobody can explain anything right. I thought I had the general idea.
@Squilliam, you are probably right, I was bored.
![]()
![]()
@ Soleron, If I do not understand how a CPU works, please tell me how they work. I would honestly like to know. Nobody can explain anything right. I thought I had the general idea.
@Squilliam, you are probably right, I was bored.
![]()
![]()
You tried to make it too simple. Also, you had a mistake in there, regarding memory.
I thought it was a good read, obv it didn't clear much up, were still left in the dark of which performs better, but it was interesting
John Lennon once told me that "Teh C3LL" would be bigger than Jesus !
GEEKS, slowly walking out......


PLAYSTATION®3 is the future.....NOW.......B_E_L_I_E_V_E
The 360 CPU has 3 dual cores which equals 6, if you don't even know that I hardly think you're qualified to compare the two.
Its clear that you don't know enough about processors to know that you don't know enough about processors to analyze them ...
Having more threads doesn't (necessarily) translate into making your application run any faster. The second you move from a single threaded application to a multi-threaded application there is a lot of overhead associated to managing resources to prevent race conditions and concurrency problems; as the number of threads increases the greater this overhead becomes as a portion of a programs run time. Beyond that, the more threads you produce the more difficult it becomes to balance the load of your application across the threads; and too much work being associated to one core in an 8 core system can make 7 cores idle while they wait for the thread on the other core to complete.
There are dozens of other considerations as well including how much more efficient a system can be if it includes complicated instructions for specific applications (like videogames); how cache size, memory bandwith and latency impact a system's performance; and how an overly complicated system may never see complicated applications (like games) that achieve a high level of performance on the system because it requires too much effort to develop for it.
| slowmo said: The 360 CPU has 3 dual cores which equals 6, if you don't even know that I hardly think you're qualified to compare the two. |
No, he's right, it's three cores. The 360 has simultaneous multithreading (Intel calls it HyperThreading, HTT) where one core can use its idle functional units to execute another thread in parallel. But it can't be counted as another real core - you can get +30% performance at best, but at worst -10%. Intel turns off HTT for benchmarks, that's how variable it is.
The PS3's PPE has SMT too, but just like the 360 it's not significant enough to call it another core.
Here's what I PM'd the OP aboit CPUs, can someone else check it?
--
A CPU, in general, operates on a sequence of instructions (addition, multiplication, etc.) by a series of microscopic switches (transistors) flipping several times a second. All the switches switch together, then wait a given time, then switch and so on. The time between switches is determined by the clock speed.The higher the clock speed, the more times per second the switching happens and the faster it proceeds through the list of instructions. Most of early CPU development was finding ways for transistors to switch faster, however the power they consume as the switch faster increases faster than the extra performance so manufacturers don't realy do that anymore.
Most instructions take more than a single clock to operate, so the number of instructions done per second (which is the actual performance of the CPU, but very hard to determine directly) was much less than the clock speed. Manufacturers decided to improve this by four main methods: pipelining, out-of-order execution, branch prediction and instruction merging.
Pipelining involves the fact that a CPU is broken up into a number of stages, call them 1, 2, 3 and 4. An instruction needs to be worked on by all four stages in turn before it is done. Suppose you have an instruction on 4. This leaves 1, 2 and 3 idle. You can start doing a different instruction on these before you finish the first, as you can have four instructions in the queue (modern CPUs use about a 14 stage pipeline). So you can do (in this case) 7 instructions in the time of 4.
Out-of-Order Execution is because some instructions require memory reads. You can't process something while it is waiting for the memory to respond (and memory is VERY slow compared to a CPU, it could be tens of clock cycles) so the CPU remains idle. Modern CPUs reorder the instructions so that while it is waiting for one it can process another that is further ahead and so keep the CPU occupied. However one instruction often depends on previous ones so they use branch prediction.
Branch prediction is where the code splits. I don't know how familiar you are with computer code, but a lot of the time it says "If X is greater than 0, do this, otherwise do that). So the result of the branch determines what code to operate on next. Modern CPUs save time by making a guess as to where the branch is going to go (yes, it actually guesses). If it's right then all of the out-of-order stuff its' done is OK, if it's wrong it loses a lot of work. The longer you make the pipeline, the more work it loses when it guesses wrong.
Instruction merging is where you have a common, but complicated task (say it's finding a square root). Instead of having a long list of add and multiply instructions, you fuse them together into a single instruction. The CPU then knows that's what you want and can do the task very efficiently and therefore in a shorter time.
So you see there are MANY factors apart from clock speed that affect how fast a CPU can get through its instructions. You can't tell from just the numbers like clock speed how fast it works, and if those factors are radically different between CPUs (as it is between the PS3 and 360) then clock speed is no judge. Clock speed is useful when two CPUs have the same physical layout and the speed is the only difference (say a Pentium III 400MHz and 500MHz) where you can usually say the faster one will be about that much faster, though it's no guarantee.
Now, multi-core. All of those things I have mentioned are things done by the CPU - the programmer doesn't have to think about them. But, if there are two cores it's like having two CPUs - you send different instructions to each. Now the programmer must divide up tasks between the cores, and make sure one task DOESN'T depend on the other otherwise one core will idle until the other is done. You could have one thread (name for series of instructions) Core 1 doing the AI, and one thread on Core 2 doing the sound, as they are reasonably independent. But thinking of ways to occupy more than about 2 cores is HARD and programming it to do it is worse. So, if they don't put full effort into it then the CPU with fewer cores that are faster (as the 360's are) can LOOK faster overall. But if they fully used all of the PS3's cores it would have higher (theoretical) peak performance.
It gets more complicated by the fact that one of the PS3's cores is different and sort of tells the others what to do. Now you're not only programming for several cores but thinking about two kinds of programming and how information is passed from the SPEs (which are very fast at certain kinds of work) to the PPE (which can do a lot more stuff).
Finally, the CPU is optimised more for work that has few threads but is very branchy and memory intensive, while a GPU is made of transistors to but is suitable for extremely-threaded work with no branches that has predictable, infrequent memory accesses. The former is most game code (AI, sound, controls, level progression, loading) whereas the latter is mainly computer graphics. Running one kind of code on the other is very slow, often by hundreds of times.
You can think of a GPU as having several hundred cores, but the programmer doesn't code for them directly, he just tells it what he wants in general (3D model here, shading effect here, anti-aliasing over all of it) in a language called DirectX or OpenGL, and the graphics driver translates these general instructions into independent work for each core.