CPU and GPU differences

前端 未结 3 585
梦如初夏
梦如初夏 2021-02-08 09:06

What is the difference between a single processing unit of CPU and single processing unit of GPU?
Most places I\'ve come along on the internet cover the high level differen

3条回答
  •  花落未央
    2021-02-08 09:38

    In essence the major difference as far as writing code to run serially is clock speed of the cores. GPUs often have hundreds of fairly slow cores (Often modern GPUs have cores with speeds of 200-400 MHz) This makes them very bad at highly serial applications, but allows them to perform highly granulated and concurrent applications (such as rendering) with a great deal of efficiency.

    A CPU however is designed to perform highly serial applications with little or no multi-threading. Modern CPUs often have 2-8 cores, with clock speeds in excess of 3-4 Ghz.

    Often times highly optimized systems will take advantage of both resources to use GPUs for highly concurrent tasks, and CPUs for highly serial tasks.

    There are several other differences such as the actual instruction sets, cache handling, etc, but those are out of scope for this question. (And even more off topic for SO)

提交回复
热议问题