简体   繁体   English

mov bx,ax和mov bh之间的速度是否存在差异啊?

[英]Is there a difference in speed between mov bx,ax and mov bh,ah?

在用于8086架构的16位MS-DOS应用程序中, mov bx,axmov bh,ah之间的速度是否存在差异?

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. 你不指定架构,但至少在8086286386486 ,他们在相同的时钟数执行:2个时钟在8088/8086286386的任何指令,1个时钟在486的任何指令。 See link . 链接

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. 根据我从英特尔64和IA32体系结构优化参考手册中收集到的内容,它们似乎表现相同,但通常比32位或64位对应程序慢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM