There are many different types of processor, with different capabilities. This can have a big effect on performance.
Many modern processors now have very large instruction sets, and some instructions are complex. For example a single instruction might load two values from memory, add them together, and store the result back in memory.
This type of design is called Complex Instruction Set Computing (CISC). The chips are very fast, but tend to be expensive to make, large, use a lot of power, and get very hot, requiring a cooling fan and a heatsink.
Mobile devices, such as smart phones, require chips which draw far less power (because they need to run on for many hours on a small battery). The also require chips which can run cool, without a heavy, bulky fan and heatsink. On the other hand, smart phones don't need the same amount of processing power, and many apps are not computer intensive.
A solution to this problem is to build processors which have a much simpler, smaller set of instructions. This is called RISC (Reduced Instruction Set Computing). A RISC computer has a simpler design, so it is smaller, cheaper and draws less power
In the case described above, a RISC processor would need 4 instructions, not just 1:
LOAD A from memory LOAD B from memory ADD A and B STORE result to memory
You have to be careful when comparing CISC and RISC processors - even at the same clock speed, the CISC processor does more per clock cycle.
A 32 bit processor has 32 bit wide registers and a 32 bit wide data bus. This means that it can read or write 4 bytes (32 bits) to memory in one go. It can also perform operations on 4 bytes at a time.
A 64 bit processor has 64 bit wide registers and a 64 bit wide data bus. This means that it can read or write 8 bytes to memory in one go and perform operations on 8 bytes at a time.
Older processors used 16 bit, 8 bit, or even 4 bit architectures, and may still be used is some older embedded systems.
This speeds up certain operations - for example if you needed to copy 1MByte of data from one part of memory to another, the 64 bit processor would need half as many memory accesses as the 32 bit processor. On the other hand, if your code is accessing byte values scattered around in memory, having a 64 bit processor will make very little difference. On average the 64 bit processor would be faster, but not twice as fast.
A register is a storage location internal to the CPU. Each register can hold a single value. The register size usually matches the architecture (eg a 32 bit processor usually has registers which are 32 bits wide).
Registers can be accessed directly by the CPU, so they are often much faster than memory (although L1 cache memory can be almost as fast as a register on some processors).
Registers are often used to hold intermediate, temporary values in calculations. By storing these values in registers, the CPU avoids having to access memory, which makes the calculations faster. Many modern CPUs have 32 or 64 registers, or in some case even more than that.
Copyright (c) Axlesoft Ltd 2020