Now that Bitcoin mining is becoming more and more popular, many people must know that GPU computing on graphics cards is much faster than CPU mining. Of course, even though GPU computing cannot be compared with professional mining machines, this does not prevent amateur miners from praising GPU computing. So why does GPU computing have an absolute advantage over CPU in Bitcoin mining? Today, let's interpret GPU computing and Bitcoin mining.
First of all, CPU and GPU are designed differently for different missions in computers:
CPU is mainly optimized for serial instructions, while GPU is optimized for large-scale parallel operations.
2 Modern multi-core CPUs target instruction set parallelism (ILP) and task parallelism (TLP), while GPU is data parallelism (DLP).
3 GPUs tend to have a larger bandwidth of memory, also known as video memory, so they will also have good performance in high-throughput applications.
The CPU needs strong versatility to handle various data types, and at the same time, logic judgment will introduce a large number of branch jump and interrupt processing. All these make the internal structure of CPU extremely complex. GPU, on the other hand, is faced with large-scale data with highly unified types and interdependence, and a pure computing environment that does not need to be interrupted. The GPU uses a large number of computing units and an extremely long pipeline, but only very simple control logic and no cache. The CPU is not only occupied by the cache, but also has complex control logic and many optimization circuits. In contrast, the computing power is only a small part of the CPU. So unlike CPU, which is good at logic control and general type data operation, GPU is good at large-scale concurrent calculation, which is suitable for password cracking.
To put it simply, CPU is a universal operation. In short, it means that no matter 100 children divide apples or simulate the earth, it can be broken down into 1+1=2, which is the most basic calculation for violence. GPU is specially used to deal with higher-order mathematical algorithms, such as calculating the relative positions of light sources, objects, viewpoints, and shadows, which requires the stacking of trigonometric functions. The Bitcoin excavator uses SHA-256, a secure hash function invented by the US National Security Agency, which is generally used for encryption and decryption of passwords. This algorithm can perform a large number of 32-bit integer right rotate operations, which is very suitable for GPUs that are good at large-scale concurrent computing and password cracking.
with Folding@home For example, Folding@home It is a distributed computing project (similar to the Bitcoin model) that studies protein folding, misfolding, polymerization and related diseases caused by it. At first, F @ H only supported CPU. Later, it added support for PS3 game console, but it also used the built-in CELL processor for computing. F @ H has opened a new page for GPU computing because of ATI's addition. Now the second generation of F @ H GPU client can support the full range of DX10 11 GPUs from ATI and NVIDIA.
It takes more than 52 days to use CPU for calculation (i7-2600K)
It only takes 7 hours and 11 minutes to calculate time with GPU (GTS450)
Not only is there a huge gap between CPU and GPU, but also GPU of different architectures are quite different. Bitcoin computing is based on the SHA-256 algorithm, which has a large number of bit operations "Right Rotate". For this operation, AMD graphics cards only need one hardware instruction natively, while NVIDIA cards need three hardware instructions to simulate. Therefore, even if the number of computing units is close, the mining efficiency of AMD graphics cards is still higher than that of NVIDIA graphics cards.
Of course, YaCoin, which uses dynamic Hash algorithm and is limited to CPU mining, does not support GPU or ASIC mining machines at present. Those who want to use CPU for mining can pay attention to it. GPU is the best choice for occasionally playing mainstream Bitcoin.