8 Years
Discussion Span
Last Post by wildgoose

I'm extremely new to assembly and was wondering if there is a speed difference between 16, 32, and 64bit registers.

Not sure what you mean by faster...

64 bit register/CPU's are faster yes because they can transfer more data plus the CPU has twice as many general registers so a 64 bit CPU(Inte/AMD) has 4 times the general register space(as compared to 32 bit Intel/AMD) to work with. So is it faster? Yes.

Or do you mean can the instruction preform faster if your working with the smaller 16 and 32 bit registers? This I'm not sure of but I do know if you opt for the smaller registers the result program will be smaller hence more efficient...

Hope this helps

Also the 8/16/32and 64 bit register are just the same register. The small versions are just fractions of the larger i.e.

al, ah, ea, eax, rax are the same register


Use the natural register size of the computer cpu mode.

On a 16-bit Real Mode the assembler (or compiler) has to add an extra machine operand to instruct the processor that it is going to do a 32-bit operation. If in 32-bit Protected Mode the same has to occur for a 16-bit operation. The same applies of 64-bit vers 32-bit.

There are also issues of pipelining stalls. If you just finished writing to the ax register, then there is a stall waiting for the ax operation to complete so that a 32-bit eax operation can be preformed!

Edited by wildgoose: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.