- #1
- 35,005
- 21,673
I have said here a few times that GPUs are not fast, they are wide. But is that the whole story? I can see several differences, and I am curious as to which ones make the biggest difference.
- They are wide. Instead of 64 bits, they can be 2048, and thus execute code 32x faster.
- The card doesn't have to run everything. If its illl-suited, dump it on the CPU. The CPU has no choice.
- CPUs use a lot of silicon to do branch prediction. The secret to fast GPU code is "never branch if you can help it" so that silicon can be used for other things.
- Half-precision is a "thing". Doubles the speed if you don't need full precision.
- GPU memory is optimized differently than CPU memory.
- Programming a GPU takes some skill, so doing it badly is harder.