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. 我的c++学习(6)默认参数和内联函数

    默认参数 一般情况下,函数调用时实参个数应与形参相同,但为了更方便地使用函数,C++也允许定义具有默认参数的函数,这种函数调用时实参个数可以与形参不相同.“默认参数”指在定义或声明函数时为形参指定默认 ...

  2. Codeforces Round #349

    终于又回到熟悉的Round了 数学 A - Pouring Rain 设个未知数,解方程,还好没有hack点 #include <bits/stdc++.h> typedef long l ...

  3. Trie + DP LA 3942 Remember the Word

    题目传送门 题意:(训练指南P209) 问长字符串S能由短单词组成的方案数有多少个 分析:书上的做法.递推法,从后往前,保存后缀S[i, len-1]的方案数,那么dp[i] = sum (dp[i+ ...

  4. 并查集(图论) LA 3644 X-Plosives

    题目传送门 题意:训练指南P191 分析:本题特殊,n个物品,n种元素则会爆炸,可以转移到图论里的n个点,连一条边表示u,v元素放在一起,如果不出现环,一定是n点,n-1条边,所以如果两个元素在同一个 ...

  5. keytool创建Keystore和Trustsotre文件

    一.生成一个含有一个私钥的keystore文件 user@ae01:~$ keytool -genkey -keystore keystore -alias jetty-azkaban -keyalg ...

  6. SqlServer事务回滚(2)

    SQL Server 2008中SQL应用系列--目录索引 SQL事务 一.事务概念    事务是一种机制.是一种操作序列,它包含了一组数据库操作命令,这组命令要么全部执行,要么全部不执行.因此事务是 ...

  7. Hadoop核心组件

    1.Hadoop生态系统 2.HDFS(Hadoop分布式文件系统) 源自于Google的GFS论文,发表于2003年10月,HDFS是GFS克隆版. 是Hadoop体系中数据存储管理的基础.它是一个 ...

  8. 最新版EJS的include函数已支持参数传递

    最新版的express中partial函数已经被移除,使用include虽然可以实现同样的效果,但是代码看起来很不爽比如 1 <%-partial("user/home",{ ...

  9. NOIP 2005 青蛙过河

    做题记录:2016-08-10 21:58:09 题目描述 在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧.在桥上有一些石子,青蛙很讨厌踩在这些石子上.由于桥的长度和青蛙一次跳过的距离都 ...

  10. 【poj2828】Buy Tickets

    Description Railway tickets were difficult to buy around the Lunar New Year in China, so we must get ...