COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

A  variety  of  studies  have  been  made  to  analyze  the  behavior  of  HLL  programs.
Table  4.8,  discussed  in  Chapter  4,  includes  key  results  from  a  number  of  studies.
There is quite good agreement in the results of this mixture of languages and appli-
cations. Assignment statements predominate, suggesting that the simple movement
of  data  is  of  high  importance.  There  is  also  a  preponderance  of  conditional  state-
ments  (IF,  LOOP).  These  statements  are  implemented  in  machine  language  with
some sort of compare and branch instruction. This suggests that the sequence con-
trol mechanism of the instruction set is important.
These  results  are  instructive  to  the  machine  instruction  set  designer,  indicat-
ing which types of statements occur most often and therefore should be supported
in an “optimal” fashion. However, these results do not reveal which statements use
the most time in the execution of a typical program. That is, we want to answer the
question:  Given  a  compiled  machine-language  program,  which  statements  in  the
source language cause the execution of the most machine-language instructions and
what is the execution time of these instructions?
To  get  at  this  underlying  phenomenon,  the  Patterson  programs  [PATT82a],
described  in  Appendix  4A,  were  compiled  on  the  VAX,  PDP-11,  and  Motorola
68000 to determine the average number of machine instructions and memory refer-
ences per statement type. The second and third columns in Table 15.2 show the rela-
tive  frequency  of  occurrence  of  various  HLL  statements  in  a  variety  of  programs;
the  data  were  obtained  by  observing  the  occurrences  in  running  programs  rather
than  just  the  number  of  times  that  statements  occur  in  the  source  code.  Hence
these  metrics  capture  dynamic  behavior.  To  obtain  the  data  in  columns  four  and
five (machine-instruction weighted), each value in the second and third columns is
multiplied by the number of machine instructions produced by the compiler. These
results  are  then  normalized  so  that  columns  four  and  five  show  the  relative  fre-
quency  of  occurrence,  weighted  by  the  number  of  machine  instructions  per  HLL

statement. Similarly, the sixth and seventh columns are obtained by multiplying the
frequency of occurrence of each statement type by the relative number of memory
references caused by each statement. The data in columns four through seven pro-
vide  surrogate  measures  of  the  actual  time  spent  executing  the  various  statement
types. The results suggest that the procedure call/return is the most time-consuming
operation in typical HLL programs.
The reader should be clear on the significance of Table 15.2. This table indi-
cates the relative performance impact of various statement types in an HLL, when
that HLL is compiled for a typical contemporary instruction set architecture. Some
other architecture could conceivably produce different results. However, this study
produces  results  that  are  representative  for  contemporary  complex  instruction  set
computer  (CISC)  architectures.  Thus,  they  can  provide  guidance  to  those  looking
for more efficient ways to support HLLs.

Given a compiled machine-language program, which statements in the source language cause the execution of the most machine-language instructions and what is the execution time of these instr的更多相关文章

  1. Cannot attach medium 'D:\program\VirtualBox\VBoxGuestAdditions.iso' {}: medium is already associated with the current state of machine uuid {}返回 代码: VBOX_E_OBJECT_IN_USE (0x80BB000C)

    详细的错误信息如下: Cannot attach medium 'D:\program\VirtualBox\VBoxGuestAdditions.iso' {83b35b10-8fa2-4b81-8 ...

  2. Calling 64-bit assembly language functions lodged inside the Delphi source code

    Code: http://www.atelierweb.com/calling-64-bit-assembly-language-functions-lodged-inside-the-delphi- ...

  3. Method, apparatus, and system for speculative abort control mechanisms

    An apparatus and method is described herein for providing robust speculative code section abort cont ...

  4. PatentTips - Mechanisms for strong atomicity in a transactional memory system

    BACKGROUND Advances in semi-conductor processing and logic design have permitted an increase in the ...

  5. 【十分钟教会你汇编】MIPS编程入门(妈妈说标题要高大上,才会有人看>_<!)

    无意中找到一篇十分好用,而且篇幅也不是很大的入门教程,通篇阅后,再把“栗子”敲一遍,基本可以有一个比较理性的认识,从而方便更好地进一步深入学习. 废话不多说,上干货(英语好的直接跳过本人的渣翻译了哈— ...

  6. The Go Programming Language. Notes.

    Contents Tutorial Hello, World Command-Line Arguments Finding Duplicate Lines A Web Server Loose End ...

  7. How do I learn machine learning?

    https://www.quora.com/How-do-I-learn-machine-learning-1?redirected_qid=6578644   How Can I Learn X? ...

  8. JVM Specification 9th Edition (4) Chapter 3. Compiling for the Java Virtual Machine

    Chapter 3. Compiling for the Java Virtual Machine 内容列表 3.1. Format of Examples 3.2. Use of Constants ...

  9. Application binary interface and method of interfacing binary application program to digital computer

    An application binary interface includes linkage structures for interfacing a binary application pro ...

随机推荐

  1. POJ3084 Panic Room(最小割)

    把某点与某几点分开的最小花费,当然想到最小割.具体怎么建图,可以画个简单的情况,然后就清楚了: 0到1不受控制,建立0->1容量为INF的边: 1到0受在0一边的一个控制面板的控制,建立1-&g ...

  2. underscore.js依赖库函数分析二(查找)

    查找: 在underscore.js封装了对dom查找的操作,find()和filter()函数,find()函数的查找操作是返回首个与条件相符的元素值,filter()函数是找到与条件相符的所有元素 ...

  3. 【原】iOS学习46之第三方CocoaPods的安装和使用(通用方法)

    本文主要说明CocoaPods的安装步骤.使用说明和常见的报错即解决方法. 1. CocoaPods 1>  CocoaPods简介 CocoaPods是一个用来帮助我们管理第三方依赖库的工具. ...

  4. BZOJ4382 : [POI2015]Podział naszyjnika

    对于每种颜色,可以发现可以切的位置被分割成了若干段独立的区域. 给每个区域一个编号,将$m$种颜色的情况当成字符串来看,如果两个切口的字符串完全匹配,那么可以在这里切两刀. 可以构造hash函数,通过 ...

  5. ubuntu server下建立分区表/分区/格式化/自动挂载(转)

    link:http://www.thxopen.com/linux/2014/03/30/Linux_parted.html 流程为:新建分区-->格式化分区-->挂载分区 首先弄明白分区 ...

  6. Arima拟合函数,se出现NaN问题

    R语言Arima函数拟合模型,se(标准误)出现NaN的问题. 参考了网上的资料,虽然不太明白是什么意思,但是这样的模型不能用. 参考:http://stackoverflow.com/questio ...

  7. webpack入门教程

    注:本文内容比较基础,供初学者快速入门参考. 更多详细信息请参考官方文档. 本文同步发布于我的博客,欢迎关注^_^ 1. 安装 npm install -g webpack 2. 基本使用 假设项目文 ...

  8. BZOJ 3339 & 莫队+"所谓的暴力"

    题意: 给一段数字序列,求一段区间内未出现的最小自然数. SOL: 框架显然用莫队.因为它兹瓷离线. 然而在统计上我打了线段树...用&维护的结点...400w的线段树...然后二分查找... ...

  9. float的元素脱离文档流,但不完全脱离,只是提升了半层;

    float的元素脱离文档流,但不完全脱离,只是提升了半层:

  10. Coder-Strike 2014 - Round 1 B. Network Configuration

    题目的意思就是给每台电脑的最大传输速度,可以限制每台电脑的最大速度,然后选择k台电脑,使这k台电脑有相同的速度,且这个速度最大 典型的贪心算法,电脑的速度排个序,选择第k大速度即可 #include ...