Originally posted by H-kon:
So, CPU isn't as important as it used to be?
I have access to a lot of older systems that just have intel graphics. Would adding a decent graphics card be better than upgrading the cpu?
Perhaps stupid questions, but i can't find anything that compares cpu's vs gpu's in terms of raw output.
That all depends on what you are doing. CPUs beat the living shit out of GPUs with complex, branchy, high precision calculations.
A GPU is very, very fast at very specific types of work. Single precision (32 bit), massively parallelisable work. Even mainstream GPUs (e.g. HD 5750) can top a teraflop at this.
The GPU just doesn't have the same overhead a CPU does for handling complex calculations, hence it can be hugely parallel. ATI's GPUs use 40 stream processors per shader element, hence each shader can have 40 operations on the go at once. An HD5750 (using this as an example as it's my card) has 18 shader elements, hence can run 18 threads at once.
So if we multiply 18 threads by 40 potential operations and 700 MHz, we get a rate of 504,000 million operations per second. This is then doubled for single precision giving a total rate of 1008 TFLOPS (MADD).
However, once you go dual precision, the rate drops through the floor. My GPU can't even do dual precision, but what happens is that two ALUs are ganged together (instantly halving the peak rate) and a bit of extra overhead in managing all that. The end result is that a GPU is around a third of its peak rate at double precision.
CPUs are much less specialised and can run near peak performance with any mix of code - even quad precision 128 bit values, which no GPU can even play with. A top end Core i7 can manage something like 80 GFLOPS. That seems slow, but that 80 GFLOPS is maintained across almost all types of code. Introduce jumps and branches into shader code for a GPU and you find that teraflops becomes megaflops in no time.