硬件架构性能 [英] Hardware Architecture performance

查看:88
本文介绍了硬件架构性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法理解这一点。在处理器性能方面,如何比较指令的性能成本?为什么指令的成本不同?

解决方案

指令的成本(让我们坚持最低级别,汇编)是它所花费的周期数完成那条指令。有些指令比其他指令需要更多周期才能完成,因此更加昂贵。



为什么说明书的费用有所不同?那取决于他们必须做的工作量。例如,Add-Store有两个操作,首先添加,然后存储。其他指令可能有3或4,有些可能需要将64位寄存器拆分为32位等等。这都会影响性能。


因为每条指令都有很少的不同形式(所以每种形式可以视为单独的指令),因为不同的指令使用不同数量的CPU时钟周期。这张照片的另一个复杂因素是并行



请参阅:

http://en.wikipedia.org/wiki/CPU_clock [ ^ ]。



参见:

http://en.wikipedia.org/wiki/Microcode [ ^ ],

http://en.wikipedia.org/wiki/Instruction_set [ ^ ],

http://en.wikipedia.org/wiki/Very_long_instruction_word [ ^ ],

http://en.wikipedia.org/wiki/MIMD [ ^ ]。



-SA

I can't get my head around this.In the context of processor performance, how can the performance cost of instructions be compared? Why do instructions differ in their cost?

解决方案

The "cost" of an instruction (lets stick with the lowest level, assembly) is the number of cycles it takes to complete that instruction. Some instructions take more cycles to accomplish than others, so therefore are more "expensive" to do.

Why do instructions differ in cost? Well depends on the amount of work they have to do. For example, an Add-Store has two operations, first it adds, then it stores. Other instructions may have 3 or 4, some may have to split 64 bit registers into 32 bit ones, etc. This all affects performance.


Because each instruction has few different forms (so each form can be considered as a separate instruction) and because different instructions use different number of CPU clock cycles. Another complication to this picture is the parallelism.

Please see:
http://en.wikipedia.org/wiki/CPU_clock[^].

See also:
http://en.wikipedia.org/wiki/Microcode[^],
http://en.wikipedia.org/wiki/Instruction_set[^],
http://en.wikipedia.org/wiki/Very_long_instruction_word[^],
http://en.wikipedia.org/wiki/MIMD[^].

—SA


这篇关于硬件架构性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆