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. 【转】Docker 常用命令

    转载: http://blog.csdn.net/zhang__jiayu/article/details/42611469   docker images:列出本地所有镜像 docker searc ...

  2. 解决嵌入WinForm的WPF控件无法显示图片问题

    解决办法是在控件初始化时,通过下面方法再次加载图片: ucCanvas.CreateCoordinateImage.Source = GetImageIcon(global::MainApplicat ...

  3. ASP.NET Global.asax详解

    最近在研究bbsmax的代码,但是一直不知道入口在哪里,然后就对各个文件分析了,然后终于在对global.asax文件查看的时候看到Application_BeginRequest才明白入口,所以现在 ...

  4. ccc tiledmap

    //移动方向枚举类 var MoveDirection = cc.Enum({ NONE: 0, UP: 1, DOWN: 2, LEFT: 3, RIGHT: 4 }); var minTilesC ...

  5. 【BZOJ】3211: 花神游历各国

    题意 \(n\)个点,第\(i\)个点值为\(a_i\).\(m\)个询问,每次询问\([l, r]\)内的和或者将\([l, r]\)的每个值改为自己的算术平方根.(\(n \le 100000, ...

  6. 【BZOJ】2938: [Poi2000]病毒

    题意 \(n\)个01病毒串,总长不超过\(30000\).问是否存在无限长的不包含病毒串的01串. 分析 考虑ac自动机,如果不包含病毒串而且无限长也就是说存在一个环(转移和fail树),使得环上不 ...

  7. UVA 11609 - Teams(二项式系数)

    题目链接 想了一会,应该是跟二项式系数有关系,无奈自己推的式子,构不成二项式的系数. 选1个人Cn1*1,选2个人Cn2*2....这样一搞,以为还要消项什么的... 搜了一下题解,先选队长Cn1,选 ...

  8. BZOJ4176: Lucas的数论

    Description 去年的Lucas非常喜欢数论题,但是一年以后的Lucas却不那么喜欢了. 在整理以前的试题时,发现了这样一道题目“求Sigma(f(i)),其中1<=i<=N”,其 ...

  9. Jquery_操作cookies

    首先引入jquery.cookie.js jquery.cookie.js下地址:http://plugins.jquery.com/cookie/ 操作文档: https://github.com/ ...

  10. 简短总结一下C#里跨线程更新UI(转)

    摘自: http://my.oschina.net/sdqxcxh/blog/53707 跨线程更新UI是写多线程程序尤其是通信类的程序经常遇到的问题,这里面主要的问题是冲突,比如数据线程想要更新UI ...