Is there a difference in speed between mov bx,ax and mov bh,ah?
Question
Is there a difference in speed between mov bx,ax
and mov bh,ah
in a 16-bit MS-DOS application for an 8086 architecture?
Solution
If in doubt, profile. But it's very unlikely in this case. From what I gleaned from the Intel 64 and IA32 Architectures Optimization Reference Manual it appears to be that they both perform identically but usually slower than their 32-bit or 64-bit counterparts.
OTHER TIPS
You don't specify the architecture, but at least in 8086
, 286
, 386
and 486
they execute in the same number of clocks: 2 clocks in 8088/8086
, 286
and 386
for either instruction, 1 clock in 486
for either instruction. See link.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow